(imported comment written by MattBoyd)
Stacy Lee
so did adjusting this key timeout stop the machine from going back to sleep after 2 min of no activity? If so what time out did you set?
To be honest, I haven’t actually tested it. I’m fairly certain that it will work though.
Stacy Lee
We have implemented custom power profile settings using the Power Profile Wizard.
In this snippet of the action:
waithidden cmd.exe /C powercfg.exe -duplicatescheme 381b4222-f694-41f0-9685-ff5bb260df2e
it looks as if the custom action is copied from the Balanced default profile. So where is the custom profile stored in the registry? (GUID ?)
I’m not sure where the profiles are stored are in the registry, but I wouldn’t recommend editing them through the registry. I would use POWERCFG.EXE instead. I recently wrote two articles about Power Management in Windows 7 that may help you understand how to use POWERCFG.EXE:
I have made some modifications to the action script generated by the power profile wizard in order to apply custom settings to custom power profiles by using POWERCFG -SETACVALUEINDEX.
The trick is that you need the GUID that’s associated with your custom power profile. You can get this by using relevance, and the power wizard has actually done that already.
For example, I wanted to enable the setting that allows Windows 7 computers to enter standby when they are connected to remote file shares. Here’s what the original action script that the power wizard made:
// This block of action will only run on Windows Vista and 7 computers:
if {name of operating system = “WinVista” or name of operating system = “Win7”}
waithidden cmd.exe /C powercfg.exe -list > __list
if {exists file “__list” whose (exists line whose (it contains “(CLM Podium No User 15-20-30)” ) of it)}
waithidden cmd.exe /C powercfg.exe -setactive {(if (exists lines whose (it contains “(CLM Podium No User 15-20-30)”) of it) then (preceding text of first “(” of following text of first “:” of concatenations of (lines whose (it contains “(CLM Podium No User 15-20-30)”) of it) of file “__list”) else (“381b4222-f694-41f0-9685-ff5bb260df2e”) ) of file “__list”}
delete __list
else
waithidden cmd.exe /C powercfg.exe -duplicatescheme 381b4222-f694-41f0-9685-ff5bb260df2e > __guid
waithidden cmd.exe /C powercfg.exe -changename {preceding text of last “(” of (following text of first ": " of (line 1 of file “__guid”))} "CLM Podium No User 15-20-30"
waithidden cmd.exe /C powercfg.exe -setactive {preceding text of last “(” of (following text of first ": " of (line 1 of file “__guid”))}
waithidden cmd.exe /C powercfg.exe -change -monitor-timeout-ac 15
waithidden cmd.exe /C powercfg.exe -change -monitor-timeout-dc 15
waithidden cmd.exe /C powercfg.exe -change -disk-timeout-ac 20
waithidden cmd.exe /C powercfg.exe -change -disk-timeout-dc 20
waithidden cmd.exe /C powercfg.exe -change -standby-timeout-ac 30
waithidden cmd.exe /C powercfg.exe -change -standby-timeout-dc 30
waithidden cmd.exe /C powercfg.exe -hibernate off
I made a few minor modifications so that I could retrieve the power profile GUID. I wrote the guid to a text file (powerguid.txt) so that I can reference it in my powercfg -SETACVALUEINDEX command at the bottom. The parts I added are in bold. I also color coded the duplicated relevance so that you (hopefully) understand where I got it from.
// This block of action will only run on Windows Vista and 7 computers:
if {name of operating system = “WinVista” or name of operating system = “Win7”}
waithidden cmd.exe /C powercfg.exe -list > __list
if {exists file “__list” whose (exists line whose (it contains “(CLM Podium No User 15-20-30)” ) of it)}
waithidden cmd.exe /C powercfg.exe -setactive color=green{(if (exists lines whose (it contains “(CLM Podium No User 15-20-30)”) of it) then (preceding text of first “(” of following text of first “:” of concatenations of (lines whose (it contains “(CLM Podium No User 15-20-30)”) of it) of file “__list”) else (“381b4222-f694-41f0-9685-ff5bb260df2e”) ) of file “__list”}[/color]
//begin addition by boyd
createfile until END
color=green{(if (exists lines whose (it contains “(CLM Podium No User 15-20-30)”) of it) then (preceding text of first “(” of following text of first “:” of concatenations of (lines whose (it contains “(CLM Podium No User 15-20-30)”) of it) of file “__list”) else (“381b4222-f694-41f0-9685-ff5bb260df2e”) ) of file “__list”}[/color]
END
copy __createfile powerguid.txt
//end addition by boyd
delete __list
else
waithidden cmd.exe /C powercfg.exe -duplicatescheme 381b4222-f694-41f0-9685-ff5bb260df2e > __guid
waithidden cmd.exe /C powercfg.exe -changename {preceding text of last “(” of (following text of first ": " of (line 1 of file “__guid”))} "CLM Podium No User 15-20-30"
waithidden cmd.exe /C powercfg.exe -setactive color=blue{preceding text of last “(” of (following text of first ": " of (line 1 of file “__guid”))}[/color]
//begin addition by boyd.
createfile until END
color=blue{preceding text of last “(” of (following text of first ": " of (line 1 of file “__guid”))}[/color]
END
copy __createfile powerguid.txt
//end addition by boyd
delete __guid
endif
waithidden cmd.exe /C powercfg.exe -change -monitor-timeout-ac 15
waithidden cmd.exe /C powercfg.exe -change -monitor-timeout-dc 15
waithidden cmd.exe /C powercfg.exe -change -disk-timeout-ac 20
waithidden cmd.exe /C powercfg.exe -change -disk-timeout-dc 20
waithidden cmd.exe /C powercfg.exe -change -standby-timeout-ac 30
waithidden cmd.exe /C powercfg.exe -change -standby-timeout-dc 30
waithidden cmd.exe /C powercfg.exe -hibernate off
// begin addition by boyd. Sets the allow sleep on open remote file
waithidden cmd.exe /C powercfg -SETACVALUEINDEX {line 1 of file “powerguid.txt” as trimmed string} fea3413e-7e05-4911-9a71-700331f1c294 0e796bdb-100d-47d6-a2d5-f7d2daa51f51 1
waithidden cmd.exe /C powercfg -SETDCVALUEINDEX {line 1 of file “powerguid.txt” as trimmed string} fea3413e-7e05-4911-9a71-700331f1c294 0e796bdb-100d-47d6-a2d5-f7d2daa51f51 1
delete powerguid.txt
// end addition by boyd
I didn’t make any changes to the applicability relevance. I didn’t need to…
I’m sorry if this looks a bit overwhelming. I tried to think of the easiest way to explain it. I’d be happy to elaborate if you have any questions.
Hopefully, this is something that BigFix will consider adding to the power profile wizard.