none
Sleep button action -> Shut Down, HOW? RRS feed

  • Question

  • Hello. I have a laptop and a desktop computers, both running Windows 7 Pro x64. On laptop, I can set the sleep button to Shut Down (I guess, I don't have the laptop here now so I cannot confirm). I would like to set the DESKTOP computer's sleep button action to Shut Down, but this option is not available (I have disabled hibernation, so sleep is the only option in advanced power settings -> sleep button action for me). I don't have a Power button on my keyboard nor on the remote control, only Sleep buttons and I do not want to use S1 nor S3. I want the computer to shut down when I press these buttons. Is there a way? Registry etc?

    Thank you in advance for your kind replies.

    Tomas.

    Tuesday, December 7, 2010 8:11 PM

Answers

  • There are alternatives to registry edits

    Investigate with an elevated command prompt the powercfg command: powercfg /?

    Note you might have to turn on hibernation to see all options for a setting: powercfg -h on, even if you don't want to use hibernation

    Example:

    See current configuration

    powercfg -getactivescheme

    Now you have the guid of the scheme being used.

    powercfg -q <currentguid>

    Look for the subgroupguid for "Power buttons and lid"

    powercfg -q <currentguid> <subgroupguid>

    Now you have the guid of the setting

    To alter the setting for ac power (and I'll show all the guids for this one)

    powercfg -setacvalueindex 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 4f971e89-eebd-4455-a8de-9e59040e7347 96996bc0-ad50-47ec-923b-6f41874dd9eb 3


    Friday, January 17, 2014 3:05 PM
  • Hi Tomas

    If you are referring to the Start/Power Button.

    Right click the Start Button and select Properties.

    In the Power Button action drop down menu, select the Shut down option.

    Apply/OK.

    Regards,


    Ronnie Vernon MVP – Windows Desktop Experience
    Tuesday, December 7, 2010 9:08 PM
    Moderator

All replies

  • Hi Tomas

    If you are referring to the Start/Power Button.

    Right click the Start Button and select Properties.

    In the Power Button action drop down menu, select the Shut down option.

    Apply/OK.

    Regards,


    Ronnie Vernon MVP – Windows Desktop Experience
    Tuesday, December 7, 2010 9:08 PM
    Moderator
  • Thanks for the reply, but no, I don't mean the Start / Shut down button, I mean the Control panel -> Power options -> <Current plan> Change plan settings -> Change advanced power settings -> Power buttons and lid -> Sleep button action. I want the "Sleep button action" to be "Shut down". But there is no "Shut down" option. So I would like to force it somehow. Maybe through the registry or something... You know - the button on my keyboard with ZZzz - I want it to turn off the PC, not to put it into sleep.

    Tomas.

    Wednesday, December 8, 2010 1:30 AM
  • Thanks for the reply, but no, I don't mean the Start / Shut down button, I mean the Control panel -> Power options -> <Current plan> Change plan settings -> Change advanced power settings -> Power buttons and lid -> Sleep button action. I want the "Sleep button action" to be "Shut down". But there is no "Shut down" option. So I would like to force it somehow. Maybe through the registry or something... You know - the button on my keyboard with ZZzz - I want it to turn off the PC, not to put it into sleep.

    Tomas.

    Hi Tomas

    The available power options will be different on a Desktop from what you see on a Laptop.

    It sounds like you have some type of Custom Keyboard if it has a Sleep Button (ZZzz).

    Configuring the keyboard actions would need to be done in the software/drivers for that keyboard.

    Take a look at the keyboard documentation or check with the keyboard manufacturer.

    Regards,


    Ronnie Vernon MVP – Windows Desktop Experience
    Wednesday, December 8, 2010 8:10 AM
    Moderator
  • Yes I have a custom keyboard from Genius, which has a sleep button, and I have a remote control for my TV card, which has a sleep button as well. Neither of those has a power button. The keyboard has no drivers nor software for it. There must be some way to make the computer shut down when I press a sleep button, if it's possible on a laptop. Maybe if someone knows where windows stores the selected sleep button action (some file / registry) I could try playing with it...
    Saturday, December 11, 2010 4:41 PM
  • yeah...go to the Control Panel/System and security/Power Options/ Change power options(edit power) and then you`ll see Change Advanced options...
    here you`ll find Power Buttons and lid.....so here you can do whatever you want...hope it`s OK....if more help needed...ask...
    Saturday, December 11, 2010 4:55 PM
  • The problem is that there is no Shut down action for the Sleep button...
    Monday, December 13, 2010 1:41 PM
  • The problem is that there is no Shut down action for the Sleep button...


    Hi Tom

    Go to the following website:

    Genius Support:
    http://www.geniusnet.com/wSite/ct?xItem=373&ctNode=86&mp=1

    On that website, identify the keyboards model name and model number.

    Next, go to this website:

    Genius Support:
    http://www.geniusnet.com/wSite/sp?xdUrl=/wSite/productDownload/download.jsp&ctNode=85&mp=1

    On the left side, enter the model number and name, and the other information in the drop down menus, including the operating system.

    Click the Search Button.

    This should give you all of the available information for that keyboard. Look for the drivers and User Manual which may have information for remapping those keys.

    Let us know what you find.

    Regards,


    Ronnie Vernon MVP – Windows Desktop Experience
    Monday, December 13, 2010 5:54 PM
    Moderator
  • Yeah, there is a driver for my keyboard. But the sleep button is not among the customizable keys and the driver does not work properly under Win7 x64 anyway. :(
    Wednesday, December 15, 2010 11:54 AM
  • In case anyone comes across this thread with the exact same question......

    First, set Sleep time to something other than zro.

    The Sleep Button Action appears in the Power buttons and lid section.  Set it to whatever.

    Set Sleep time to zero if you wish.

    Tuesday, February 28, 2012 1:16 PM
  • Wow Tom, I feel bad for you, it seems like NO ONE here is actually READING what you're trying to do. The moderator is just copying and pasting nonesence that's not relevant to your question besides for a few key words where he's pasting a quick and useless answer. It has nothing to do with the keyboard, it's the Windows power setting itself that doesn't allow a "Shut Down" option under the "Sleep" Power settings. I'm looking for the same thing. It doesn't matter if the sleep button is on the system itself, keyboard, remote or whatnot, it's still being derived from the windows power features list.

    I've been looking for a registry fix for that, i'll let you know if I find something.

    Monday, March 5, 2012 5:19 AM
  • Hi, I've found a possible solution.

    Problem:

    Control Panel\All Control Panel Items\Power Options\Change when the computer sleeps\Change advanced power settings\Power buttons and lid\Sleep button action\Setting:

    don't have the "Shut Down" option.

    Possible solution:

    Run: Regedit

    Open: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Power\PowerSettings

    Then, click on every folder until you find one folder that contains the "FriendlyName": @%SystemRoot%\system32\powrprof.dll,-251,Power buttons settings

    mine is the folder: 4f971e89-eebd-4455-a8de-9e59040e7347

    when you find it, open it and search for the forder that contais the "FriendlyName": @%SystemRoot%\system32\powrprof.dll,-255,sleep button action

    mine is the folder: 96996bc0-ad50-47ec-923b-6f41874dd9eb

    then, open the forlder: DefaultPowerSchemeValues

    you will find 3 folders. For each folder you will have 3 "files". You need to change the value of the files (in every one of the 3 folders):

    AcSettingIndex: to 3 (it is by default to 1)

    DcSettingIndex: to 3 (it is by default to 1)

    Then, you go back to the Control Panel:

    Control Panel\All Control Panel Items\Power Options\Change when the computer sleeps\

    and click on: Restore default settings for this plan

    and its done!!

    hope this helps... good luck.

    • Proposed as answer by kmizell Monday, March 9, 2015 8:09 PM
    Wednesday, March 14, 2012 2:06 AM
  • I created an account just to thank you for this..................
    Friday, April 6, 2012 10:32 AM
  • Dinis_Pereira's post -  that fixed it! :)
    Monday, September 10, 2012 8:51 AM
  • It worked also for me ! :)

    Thanks to all, especially Dinis_Pereira !!

    Since the registry entries seem the same for everybody, I created a .reg with the modifications..

    so now it's even simpler.. to bad I can't attach it here.. but since it's just a text file, you can copy/paste the following into a text file you create and rename it with .reg at the end.. after that you'll just have to double-click it to make the changes and as Dinis said

    go back to the Control Panel : Control Panel\All Control Panel Items\Power Options\Change when the computer sleeps\

    and click on: Restore default settings for this plan and its done!!

    reg file content :

    ------
    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Power\PowerSettings\4f971e89-eebd-4455-a8de-9e59040e7347\96996bc0-ad50-47ec-923b-6f41874dd9eb\DefaultPowerSchemeValues]

    [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Power\PowerSettings\4f971e89-eebd-4455-a8de-9e59040e7347\96996bc0-ad50-47ec-923b-6f41874dd9eb\DefaultPowerSchemeValues\381b4222-f694-41f0-9685-ff5bb260df2e]
    "AcSettingIndex"=dword:00000003
    "DcSettingIndex"=dword:00000003

    [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Power\PowerSettings\4f971e89-eebd-4455-a8de-9e59040e7347\96996bc0-ad50-47ec-923b-6f41874dd9eb\DefaultPowerSchemeValues\8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c]
    "AcSettingIndex"=dword:00000003
    "DcSettingIndex"=dword:00000003

    [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Power\PowerSettings\4f971e89-eebd-4455-a8de-9e59040e7347\96996bc0-ad50-47ec-923b-6f41874dd9eb\DefaultPowerSchemeValues\a1841308-3541-4fab-bc81-f71556f20b4a]
    "AcSettingIndex"=dword:00000003
    "DcSettingIndex"=dword:00000003

    --------

    enjoy your newly "sleep (to shutdown) computer" button on your keyboard :)

    • Proposed as answer by pcwp Tuesday, November 19, 2013 1:02 PM
    Wednesday, December 12, 2012 6:21 PM
  • im here only to thank you !!! i've been looking for a solution to my mce remote control for almost a year, and that registry settings solved all my problems!!! and works under windows 8 =) my mce remote now shuts down my htpc when i press power button instead of sleeping, no more childrens waking my htpc! THANK YOU VERY MUCH!!!
    Saturday, February 9, 2013 10:50 PM
  • I knew that a registry edit had to exist, thank you very much! 
    Tuesday, November 19, 2013 1:02 PM
  • There are alternatives to registry edits

    Investigate with an elevated command prompt the powercfg command: powercfg /?

    Note you might have to turn on hibernation to see all options for a setting: powercfg -h on, even if you don't want to use hibernation

    Example:

    See current configuration

    powercfg -getactivescheme

    Now you have the guid of the scheme being used.

    powercfg -q <currentguid>

    Look for the subgroupguid for "Power buttons and lid"

    powercfg -q <currentguid> <subgroupguid>

    Now you have the guid of the setting

    To alter the setting for ac power (and I'll show all the guids for this one)

    powercfg -setacvalueindex 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 4f971e89-eebd-4455-a8de-9e59040e7347 96996bc0-ad50-47ec-923b-6f41874dd9eb 3


    Friday, January 17, 2014 3:05 PM
  • @Dinis_Pereira

    Thank you, this was exactly what I needed.  My NUC now powers down when I hit the power button my Harmony One remote.  Before it just went into some sort of a hybrid sleep mode.

    Monday, March 9, 2015 8:11 PM
  • Is there a way to do LOCK instead of sleep!?  I tried changing the values from 1- nothing, 2-sleep, 3, shutdown.  But cant find LOCK.
    Thursday, May 14, 2015 1:54 PM
  • It worked!... Thanks a lot Dinis_Pereira.
    Saturday, July 18, 2015 10:17 PM
  • That is the correct answer, thank you very much. Much safe than editing the registry.
    You can run the following to get help about that powercfg function:
    powercfg -setacvalueindex /?

    So the correct syntax is:
    POWERCFG /SETACVALUEINDEX <SCHEME_GUID> <SUB_GUID> <SETTING_GUID> <SETTING_INDEX>

    Those three UIDs can be deduced as Wray described above.

    Wednesday, February 3, 2016 10:30 PM
  • You're the real MVP
    Saturday, February 23, 2019 9:06 PM