From b60244a2f96d299c8cf3b098785568d42d88d017 Mon Sep 17 00:00:00 2001 From: Alan Mason <1923621+2Shirt@users.noreply.github.com> Date: Wed, 22 Nov 2017 15:01:02 -0800 Subject: [PATCH] LaunchOffice cleanup --- .bin/Scripts/Launch.cmd | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.bin/Scripts/Launch.cmd b/.bin/Scripts/Launch.cmd index c77c604e..1770c503 100644 --- a/.bin/Scripts/Launch.cmd +++ b/.bin/Scripts/Launch.cmd @@ -175,26 +175,27 @@ goto Exit :LaunchOfficeSetup rem Prep +echo Copying setup file(s) for %L_ITEM%... set "fastcopy_args=/cmd=diff /no_ui /auto_close" set "product=%L_PATH%\%L_ITEM%" set "product_name=%L_ITEM%" call :GetBasename product_name || goto ErrorBasename -set "source=\\%OFFICE_SERVER%\Office\!product!" +set "source=\\%OFFICE_SERVER%\Office\%product%" set "dest=%client_dir%\Office" rem Verify -if not exist "!source!" (goto ErrorOfficeSourceNotFound) +if not exist "%source%" (goto ErrorOfficeSourceNotFound) rem Copy -start "" /wait "%FASTCOPY%" !fastcopy_args! "!source!" /to="!dest!\" +start "" /wait "%FASTCOPY%" %fastcopy_args% "%source%" /to="%dest%\" rem Run -if exist "!dest!\!product_name!\setup.exe" ( - start "" "!dest!\!product_name!\setup.exe" || goto ErrorUnknown -) else if "!product_name:~-3,3!" == "exe" ( - start "" "!dest!\!product_name!" || goto ErrorUnknown -) else if "!product_name:~-3,3!" == "msi" ( - start "" "!dest!\!product_name!" || goto ErrorUnknown +if exist "%dest%\%product_name%\setup.exe" ( + start "" "%dest%\%product_name%\setup.exe" || goto ErrorUnknown +) else if "%product_name:~-3,3%" == "exe" ( + start "" "%dest%\%product_name%" || goto ErrorUnknown +) else if "%product_name:~-3,3%" == "msi" ( + start "" "%dest%\%product_name%" || goto ErrorUnknown ) else ( rem Office source not supported by this script goto ErrorOfficeUnsupported