From 63fcaed8cd172d25a8b8ccc7314257b140682abd Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 23 Nov 2018 17:54:46 -0700 Subject: [PATCH] Updated Launchers --- .bin/Scripts/Launch.cmd | 10 +++++----- .bin/Scripts/Launcher_Template.cmd | 4 ++-- .bin/Scripts/init_client_dir.cmd | 8 +++++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.bin/Scripts/Launch.cmd b/.bin/Scripts/Launch.cmd index f7080adb..0a0330c6 100644 --- a/.bin/Scripts/Launch.cmd +++ b/.bin/Scripts/Launch.cmd @@ -279,9 +279,9 @@ rem Create VB script mkdir "%bin%\tmp" 2>nul echo Set UAC = CreateObject^("Shell.Application"^) > "%bin%\tmp\Elevate.vbs" if defined L_NCMD ( - echo UAC.ShellExecute "%PYTHON%", """%script%""", "", "runas", 3 >> "%bin%\tmp\Elevate.vbs" + echo UAC.ShellExecute "%PYTHON%", """%script%"" %L_ARGS%", "", "runas", 3 >> "%bin%\tmp\Elevate.vbs" ) else ( - echo UAC.ShellExecute "%CON%", "-run ""%PYTHON%"" ""%script%"" -new_console:n", "", "runas", 1 >> "%bin%\tmp\Elevate.vbs" + echo UAC.ShellExecute "%CON%", "-run ""%PYTHON%"" ""%script%"" %L_ARGS% -new_console:n", "", "runas", 1 >> "%bin%\tmp\Elevate.vbs" ) rem Run @@ -290,9 +290,9 @@ goto Exit :LaunchPyScriptUser if defined L_NCMD ( - start "" "%PYTHON%" "%script%" || goto ErrorUnknown + start "" "%PYTHON%" "%script%" %L_ARGS% || goto ErrorUnknown ) else ( - start "" "%CON%" -run "%PYTHON%" "%script%" -new_console:n || goto ErrorUnknown + start "" "%CON%" -run "%PYTHON%" "%script%" %L_ARGS% -new_console:n || goto ErrorUnknown ) goto Exit @@ -332,7 +332,7 @@ echo. Executable Working Dir Program Args [L_7ZIP] [L_ELEV] [L__CLI] echo. Folder Folder '.' [L_7ZIP] echo. Office Year Product [L_7ZIP] echo. PSScript Scripts Script [L_7ZIP] [L_ELEV] [L_NCMD] -echo. PyScript Scripts Script [L_7ZIP] [L_ELEV] [L_NCMD] +echo. PyScript Scripts Script Args [L_7ZIP] [L_ELEV] [L_NCMD] echo. QuickBooks Year Product [L_7ZIP] echo. echo.L_7ZIP: Extra arguments for 7-Zip (in the :ExtractCBin label) diff --git a/.bin/Scripts/Launcher_Template.cmd b/.bin/Scripts/Launcher_Template.cmd index 90b15482..01d1758d 100644 --- a/.bin/Scripts/Launcher_Template.cmd +++ b/.bin/Scripts/Launcher_Template.cmd @@ -17,7 +17,7 @@ call :SetTitle Launcher rem EXTRA_CODE :DefineLaunch -:: See %bin%\SCripts\Launch.cmd for details under :Usage label +:: See %bin%\Scripts\Launch.cmd for details under :Usage label set L_TYPE= set L_PATH= set L_ITEM= @@ -110,4 +110,4 @@ goto Exit :: Cleanup and exit :: :Exit endlocal -exit /b %errorlevel% \ No newline at end of file +exit /b %errorlevel% diff --git a/.bin/Scripts/init_client_dir.cmd b/.bin/Scripts/init_client_dir.cmd index 4d73e7ab..302b27d1 100644 --- a/.bin/Scripts/init_client_dir.cmd +++ b/.bin/Scripts/init_client_dir.cmd @@ -33,7 +33,7 @@ for /f "tokens=* usebackq" %%f in (`findstr KIT_NAME_SHORT "%SETTINGS%"`) do ( set "KIT_NAME_SHORT=!_v:~0,-1!" ) set "client_dir=%systemdrive%\%KIT_NAME_SHORT%" -set "log_dir=%client_dir%\Info\%iso_date%" +set "log_dir=%client_dir%\Logs\%iso_date%" :Flags set _backups= @@ -45,7 +45,7 @@ set _transfer= for %%f in (%*) do ( if /i "%%f" == "/DEBUG" (@echo on) if /i "%%f" == "/Backups" set _backups=True - if /i "%%f" == "/Info" set _info=True + if /i "%%f" == "/Logs" set _logs=True if /i "%%f" == "/Office" set _office=True if /i "%%f" == "/Quarantine" set _quarantine=True if /i "%%f" == "/QuickBooks" set _quickbooks=True @@ -54,7 +54,9 @@ for %%f in (%*) do ( :CreateDirs if defined _backups mkdir "%client_dir%\Backups">nul 2>&1 -if defined _info mkdir "%client_dir%\Info">nul 2>&1 +if defined _logs ( + mkdir "%log_dir%\%KIT_NAME_FULL%">nul 2>&1 + mkdir "%log_dir%\Tools">nul 2>&1) if defined _office mkdir "%client_dir%\Office">nul 2>&1 if defined _quarantine mkdir "%client_dir%\Quarantine">nul 2>&1 if defined _quickbooks mkdir "%client_dir%\QuickBooks">nul 2>&1