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?
powercfg.exe works a little differently in Vista, and the "presentation" profile isn't included by default (at least on my machine. so you can setup a "presentation" profile and then use the following to get the GUID
powercfg.exe -list
and the following to set it to that GUID:
powercfg.exe -setactive GUID
Alternatively, you can use powercfg.exe with the -change or -X to change specific parameters on the current power scheme.
Snippet from "powercfg.exe /?":
-CHANGE, -X Modifies a setting value in the current power scheme.
Usage: POWERCFG -X <SETTING> <VALUE> <SETTING> Specifies one of the following options: -monitor-timeout-ac <minutes> -monitor-timeout-dc <minutes> -disk-timeout-ac <minutes> -disk-timeout-dc <minutes> -standby-timeout-ac <minutes> -standby-timeout-dc <minutes> -hibernate-timeout-ac <minutes> -hibernate-timeout-dc <minutes> Example: POWERCFG -Change -monitor-timeout-ac 5 This would set the monitor idle timeout value to 5 minutes when on AC power.