Advertisement
Guest User

Cmd Batch help

a guest
Jul 24th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. start cmd.exe && goto countdown
  2.  
  3. :countdown
  4. echo Press [1] key to execute early, Press [2] key to abort and close program.
  5. choice /n /c 12 /d 1 /t 60
  6. IF ERRORLEVEL ==1 goto run
  7. IF ERRORLEVEL ==2 exit
  8.  
  9. exit
  10.  
  11. :run
  12. reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 1 /f
  13. sc config wuauserv start= disabled
  14. net stop wuauserv && go to pause
  15. pause
  16. IF ERRORLEVEL ==3 go to run
  17. pause
  18.  
  19. :run
  20. reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 0 /f
  21. sc config wuauserv start= auto
  22. net start wuauserv
  23. pause
  24. exit
  25.  
  26. I probably have it wrong but I'm trying. I'm wanting to make it so you first open you go to adminstrative command prompt and has choices. I have this all wrong I'm betting.
  27.  
  28. Choice one: disable and force stop all windows services
  29. Choice two: enable and force start all windows services
  30. Choice three: exit
  31.  
  32. all in a .cmd batch file.
  33.  
  34. I think what I have is okay but I don't want to cause an infinite loop and ruin my pc.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement