Advertisement
Guest User

Disable wake timers on Windows 10

a guest
Jun 10th, 2019
2,153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.52 KB | None | 0 0
  1. @echo off
  2. cd %~dp0
  3.  
  4. if "%1"=="admin" goto admin
  5.  
  6. rem Search for PsExec
  7. where /q psexec || (
  8.     echo You need PsExec to run this batch file.
  9.     pause>nul
  10.     exit
  11. )
  12.  
  13. rem Fix PsExec hang
  14. sc stop psexesvc>nul
  15. sc delete psexesvc>nul
  16.  
  17. rem Run this batch file with PsExec
  18. psexec -nobanner -s %windir%\System32\cmd.exe /k "%~f0" admin || (
  19.     echo.
  20.     echo Run this batch file as administrator.
  21.     pause>nul
  22. )
  23. exit /b
  24.  
  25. :admin
  26.  
  27. rem Disable tasks that are responsible for waking the PC
  28. schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\AC Power Download"
  29. schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\Backup Scan"
  30. schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\Schedule Scan Static Task"
  31. schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\UpdateModelTask"
  32. schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\USO_UxBroker"
  33. schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\AC Power Install"
  34. schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\Schedule Scan"
  35. schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\Universal Orchestrator Idle Start"
  36. schtasks /change /disable /tn "\Microsoft\Windows\UpdateOrchestrator\Universal Orchestrator Start"
  37.  
  38. rem List all tasks under UpdateOrchestrator
  39. schtasks /query /tn \Microsoft\Windows\UpdateOrchestrator\
  40.  
  41. echo.
  42. echo Add enabled tasks to the batch file.
  43. echo.
  44.  
  45. rem This should print that you have no active wake timers
  46. powercfg /waketimers
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement