:: Turn echo off and clear command prompt window. @echo off cls :: set program=Program Name set "program=Hawkes Learning Systems Statistics" :: set installer=%~dp0somefile.ext set installer=%~dp0statbeg-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\Statistics\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\Statistics\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%" /qn :: Remove updater program echo. echo Uninstalling the Updater program. start /wait "Uninstalling Updater" "%updaterPath%\%updaterProg%" /qn REMOVE=TRUE MODIFY=FALSE :: 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 Statistics" :: set uninstaller=program.ext :: use %~dp0 if uninstaller is in directory with script set "statsPath=%programdata%\{57CFA262-ED82-4C61-A9C3-07617B420668}" set "statsProg=statbeg-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\Statistics\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\Statistics\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" "%statsPath%\%statsProg%" /qn REMOVE=TRUE MODIFY=FALSE if exist "%updaterPath%\%updaterProg%" ( :: Remove updater program echo. echo Uninstalling the Updater program. start /wait "Uninstalling Updater" "%updaterPath%\%updaterProg%" /qn REMOVE=TRUE MODIFY=FALSE ) :: Remove folders if they exist echo. echo Removing left-over directories if they exist. 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. They do delete themselves after reboot. 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.