Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #cs
- You can type commands below in a dos prompt w/ AdminRights to force the shutdown of windows update related services.
- net stop bits
- net stop wlidsvc
- net stop TokenBroker
- net stop UsoSvc
- net stop wuauserv
- net stop TrustedInstaller
- #CE
- ;lines that begin with ; are commented lines. They do nothing in the actual script.
- ;lines that have a ; at some point after the beginning comments out everything after ;
- ;Beginning Of Script to run in AUTOit that runs in the background and automatically shuts/disables the services if they ever
- auto reactivate themselves.
- While 1 = 1 ;Start and do everything in While -> Wend loop indefinitely
- if @hour = 14 Then ;At 2pm do the below line. This time is in Military Time Format and can be set to your needs.
- Exit ;close and terminate script
- EndIf
- Run(@ComSpec & " /k net stop bits", "", @SW_HIDE)
- Sleep(3000)
- ProcessClose("cmd.exe")
- Run(@ComSpec & " /k net stop wlidsvc", "", @SW_HIDE)
- Sleep(3000)
- ProcessClose("cmd.exe")
- Run(@ComSpec & " /k net stop TokenBroker", "", @SW_HIDE)
- Sleep(3000)
- ProcessClose("cmd.exe")
- Run(@ComSpec & " /k net stop UsoSvc", "", @SW_HIDE)
- Sleep(3000)
- ProcessClose("cmd.exe")
- Run(@ComSpec & " /k net stop wuauserv", "", @SW_HIDE)
- Sleep(3000)
- ProcessClose("cmd.exe")
- Run(@ComSpec & " /k net stop TrustedInstaller", "", @SW_HIDE)
- Sleep(3000)
- ProcessClose("cmd.exe")
- Run(@ComSpec & " /k net stop TrustedInstaller", "", @SW_HIDE)
- Sleep(3000)
- ProcessClose("cmd.exe")
- Sleep(10000) ;Sleep Script for 10 minutes until rechecking services
- WEnd ; Exit the main loop
- Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement