:: Turn echo off and clear command prompt window. @echo off cls :: set program=Program Name set "program=Hawkes Learning Systems College Algebra" :: set installer=%~dp0somefile.ext set installer=%~dp0col-student-setup.exe set "updaterPath=%programdata%\{2CB7E68C-946F-4273-97CC-85B3F2AB1353}" set "updaterProg=Hawkes Update Service Manager.exe" echo Installing %program% - Please Wait echo Started @ %time% echo Window will close once complete. echo. echo. :: Check which OS arch-type is being used if exist "%programfiles(x86)%" (goto x64) else (goto x86) :x64 :: Check if program exists or not if exist "%programfiles(x86)%\Hawkes Learning Systems\College Algebra\HLSTOC.exe" ( echo %program% found. Exiting. set EXIT_CODE=1337 goto end ) goto install :x86 :: Check if program exists or not if exist "%programfiles%\Hawkes Learning Systems\College Algebra\HLSTOC.exe" ( echo %program% found. Exiting. set EXIT_CODE=1337 goto end ) goto install :install :: Install program echo %program% not installed. Installing. start /wait "%program% Installing" "%installer%" SILENT=TRUE :: Uninstall Update Manager echo. echo Uninstalling the Updater Manager. start /wait "Update Manager Uninstalling" "%updaterPath%\%updaterProg%" REMOVE=TRUE MODIFY=FALSE SILENT=TRUE :: Remove folders if they exist echo. echo Removing left-over directories. if exist "%programfiles(x86)%\Hawkes Learning Systems\Hawkes Update Service Manager" rmdir "%programfiles(x86)%\Hawkes Learning Systems\Hawkes Update Service Manager" /s /q if exist "%programfiles%\Hawkes Learning Systems\Hawkes Update Service Manager" rmdir "%programfiles%\Hawkes Learning Systems\Hawkes Update Service Manager" /s /q if exist "%programdata%\~0" rmdir "%programdata%\~0" /s /q goto end :end :: Finish time echo. echo Finished @ %time% :: Return exit code to SCCM exit /B %EXIT_CODE%
:: Turn echo off and clear command prompt window. @echo off cls :: set program=Program Name set "program=Hawkes Learning Systems College Algebra" :: set uninstaller=program.ext :: use %~dp0 if uninstaller is in directory with script set "colAlgPath=%programdata%\{26984380-6982-42D2-B43C-4F5C7CD47B22}" set "colAlgProg=col-student-setup.exe" set "updaterPath=%programdata%\{2CB7E68C-946F-4273-97CC-85B3F2AB1353}" set "updaterProg=Hawkes Update Service Manager.exe" echo Uninstalling %program% - Please Wait echo Started @ %time% echo Window will close once complete. echo. echo. :: Check which OS arch-type is being used if exist "%programfiles(x86)%" (goto x64) else (goto x86) :x64 :: Check if program exists or not if exist "%programfiles(x86)%\Hawkes Learning Systems\College Algebra\HLSTOC.exe" ( goto uninstall ) echo %program% not found. Exiting. set EXIT_CODE=1337 goto end :x86 :: Check if program exists or not if exist "%programfiles%\Hawkes Learning Systems\College Algebra\HLSTOC.exe" ( goto uninstall ) echo %program% not found. Exiting. set EXIT_CODE=1337 goto end :uninstall :: Uninstall program echo %program% found. Uninstalling. start /wait "%program% Uninstalling" "%colAlgPath%\%colAlgProg%" REMOVE=TRUE MODIFY=FALSE SILENT=TRUE if exist "%updaterPath%\%updaterProg%" ( :: Uninstall Update Manager echo. echo Uninstalling the Updater Manager. start /wait "Update Manager Uninstalling" "%updaterPath%\%updaterProg%" REMOVE=TRUE MODIFY=FALSE SILENT=TRUE ) :: Remove folders if they exist echo. echo Removing left-over directories if they exist. if exist "%programfiles(x86)%\Hawkes Learning Systems\Hawkes Update Service Manager" rmdir "%programfiles(x86)%\Hawkes Learning Systems\Hawkes Update Service Manager" /s /q if exist "%programfiles%\Hawkes Learning Systems\Hawkes Update Service Manager" rmdir "%programfiles%\Hawkes Learning Systems\Hawkes Update Service Manager" /s /q if exist "%programdata%\~0" rmdir "%programdata%\~0" /s /q if exist "%programdata%\~1" rmdir "%programdata%\~1" /s /q :: Will need to remove the Hawkes folder from the Program Files folder individually after :: a reboot as there are files in the Common dirctory there that prevent deletion until :: the computer is restarted. goto end :end :: Finish time echo. echo Finished @ %time% :: Return exit code to SCCM exit /B %EXIT_CODE%
View inventory records anonymously contributed by opt-in users of the K1000 Systems Management Appliance.