These steps will require you to create a GPO (Group Policy Object)
NOTE: This will require a system restart!
Script 1: Logoff
- Create a .bat file with the following content and save as logoff.bat
rd /s /q "%appdata%\CyberSmart"
rd /s /q "%localappdata%\CyberSmart"
reg delete HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /v CyberSmart /f
2. Open Group Policy Management Editor
3. Right click on policy and select edit
4. Navigate to, User Configuration > Policies > Windows Settings > Scripts > Logoff
5. Select Add, click Browse and select the newly created logoff.bat file
Script 2: Shutdown
- Create a .bat file with the following content and save as shutdown.bat
net stop "CyberSmart Service"
sc delete "CyberSmart Service"
rd /s /q "%systemDrive%\ProgramData\CyberSmart"
rd /s /q "%ProgramFiles(x86)%\CyberSmart"
rd /s /q "%ProgramFiles%\CyberSmart"
2. Navigate to, Computer Configuration > Policies > Windows Settings > Scripts > Shutdown
3. Select Add, click Browse and select the newly created shutdown.bat file
Optional: if deployed originally via startup script
If the application was deployed via startup script, to prevent the application re-installing on restart then the deployment script must be removed:
- Open the Local Group Policy Editor.
- In the console tree, click Scripts (Startup/Shutdown) . The path is Computer Configuration\Windows Settings\Scripts (Startup/Shutdown) .
- In the results pane, double-click Startup .
- In the Startup Properties dialog box, select the script added for CyberSmart and remove.