2

I tried the following to set the Power Button to mean Sleep, but it does not alter the power configuration that shows in the control panel in Windows 7. Any thoughts?

powercfg -setacvalueindex 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 
4f971e89-eebd-4455-a8de-9e59040e7347  7648efa3-dd9c-4e3e-b566-50f929386280 1 

1 Answer 1

1

The command you have used is correct and the change be verified inside the advanced option of the high performance plan.

However, powercfg.exe only changes one setting in one power plan at a time. The command Change what the power buttons do (Control Panel - Power Options) will change one setting in all power plans at once.

You can easily see when using Process Monitor (Filter: RegSetValue and path containing Power). A change by powercfg.exe looks like this:

Single change, caused by powercfg.exe

Using the above mentioned command from the command panel results in these changes:

Three changes, caused by control panel

Therefore, if you use powercfg.exe to set this setting in all power plans should therefore be reflected in Change what the power buttons do.

(You might to need to save the screenshots to your local computer to view them)

A script that causes powercfg.exe to change a setting in all power plans can be found here.

4
  • Tex: thanks for your help! If you go into Control Panel, Power Options, and click on "Choose what the power buttons do" you will notice that it says "The changes that you make to the settings on this page apply to all your power plans". Thus, these settings are independent of power schemes. That said, my active scheme is High Performance, and running the script that you supplied does not change the power button settings in the Control Panel on my computer. I don't really care what PowerCfg reveals with -q if the Control Panel settings are wrong.
    – jon bondy
    Jul 30, 2011 at 1:10
  • Okay, now I understood. I will change the answer to reflect what happens there.
    – Tex Hex
    Jul 30, 2011 at 9:38
  • Tex: that did it. I was able to modify the scripts you referenced in "here" above to do what I wanted. Thank you!
    – jon bondy
    Jul 30, 2011 at 13:14
  • 1
    You're welcome. Could you then please mark my answer?
    – Tex Hex
    Jul 30, 2011 at 14:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .