Turn off power saving options via command line

Nick picture Nick · Oct 31, 2008 · Viewed 34.4k times · Source

On Windows XP, the following command in a script will prevent any power saving options from being enabled on the PC (monitor sleep, HD sleep, etc.). This is useful for kiosk applications.

powercfg.exe /setactive presentation

What is the equivalent on Vista?

Answer

Nick picture Nick · Nov 3, 2008

Setting a value to never can be done by passing a value of 0 to the -change option, i.e.:

powercfg.exe -change -monitor-timeout-ac 0

means the monitor timeout will be set to "Never". So the presentation plan can be achieved via:

powercfg.exe -change -monitor-timeout-ac 0
powercfg.exe -change -disk-timeout-ac 0
powercfg.exe -change -standby-timeout-ac 0
powercfg.exe -change -hibernate-timeout-ac 0