A utility for preventing Windows from falling asleep.
See doc for Russian: README.RUS.md.
The utility uses SetThreadExecutionState (kernel32).
SetThreadExecutionState is used to stop the machine timing out and entering standby/switching the display device off.
Command for help:
GSimpleWinSleepPreventer.exe -h
You can set the several manual modes of EXECUTION_STATE:
- away (
ES_AWAYMODE_REQUIRED
)
GSimpleWinSleepPreventer.exe -es away
- continuous (
ES_CONTINUOUS
)
GSimpleWinSleepPreventer.exe -es continuous
- display (
ES_DISPLAY_REQUIRED
)
GSimpleWinSleepPreventer.exe -es display
- system (
ES_SYSTEM_REQUIRED
)
GSimpleWinSleepPreventer.exe -es system
You can use multiple modes:
GSimpleWinSleepPreventer.exe -es continuous display system
You can set one of the quick modes:
- monitor - prevent only monitor powerdown. Modes in use:
ES_CONTINUOUS
andES_DISPLAY_REQUIRED
.
GSimpleWinSleepPreventer.exe -m
- sleep - prevent Idle-to-Sleep (monitor not affected). Modes in use:
ES_CONTINUOUS
andES_AWAYMODE_REQUIRED
.
GSimpleWinSleepPreventer.exe -s
- awake - enable away mode and prevent the sleep idle time-out. Modes in use:
ES_CONTINUOUS
andES_SYSTEM_REQUIRED
.
GSimpleWinSleepPreventer.exe -a
- full - enable full prevent. Uses all modes (display, system, away) in continuous:
ES_CONTINUOUS
,ES_DISPLAY_REQUIRED
,ES_SYSTEM_REQUIRED
andES_AWAYMODE_REQUIRED
.
GSimpleWinSleepPreventer.exe -f