Reputation: 13444
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?
Upvotes: 14
Views: 39527
Reputation: 1
@ECHO OFF
powercfg -change -monitor-timeout-ac 0
powercfg -change -standby-timeout-ac 0
powercfg -change -disk-timeout-ac 0
powercfg -change -hibernate-timeout-ac 0
This will work
Upvotes: 0
Reputation: 41
(at least) for windows 7:
Nice Shortcuts are:
cheers
Kai
Upvotes: 4
Reputation: 13444
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
Upvotes: 11
Reputation: 1409
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.
Upvotes: 4
Reputation: 3431
C:\Windows\system32>powercfg /list
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e (Balanced) *
Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c (High performance)
Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a (Power saver)
C:\Windows\system32>powercfg /setactive a1841308-3541-4fab-bc81-f71556f20b4a
Upvotes: 1
Reputation: 96147
In Vista you create a power profile and use the commandline powercfg to select that profile see here
Upvotes: 0