Skip to content

Instantly share code, notes, and snippets.

@ibaaj
Last active November 15, 2016 12:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ibaaj/8118121 to your computer and use it in GitHub Desktop.
Save ibaaj/8118121 to your computer and use it in GitHub Desktop.
prevent from sleeping a Windows computer (and let working an alarm clock program )
Config .
powercfg /c BaajAlarm
powercfg /x BaajAlarm /monitor-timeout-ac 15
powercfg /x BaajAlarm /monitor-timeout-dc 15
powercfg /x BaajAlarm /disk-timeout-ac 15
powercfg /x BaajAlarm /disk-timeout-dc 15
powercfg /x BaajAlarm /standby-timeout-ac 0
powercfg /x BaajAlarm /standby-timeout-dc 0
powercfg /x BaajAlarm /hibernate-timeout-ac 0
powercfg /x BaajAlarm /hibernate-timeout-dc 0
powercfg /s BaajAlarm
NET STOP wuauserv
Restore
powercfg /s Normal
powercfg /d BaajAlarm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment