Subscribe to How-To Geek

Recommended: Click Here to Run a Free Scan for Common PC Errors   [Sponsored Link]

Change the Windows Vista Power Buttons to Shut Down

The default action for the Power button on the start menu in Windows Vista is Sleep, which isn't necessarily useful for everybody. You can configure this setting easily by using the advanced power settings panel, which is a little tricky to get to normally, but we'll take the shortcut.

Open a command prompt (type cmd into the start menu search bar), and then type in the following:

powercfg.cpl,1

You could also take the long route (Control Panel \ Power Options \ Change Plan Settings \ Change Advanced Power Settings)

Once you get to this dialog, browse down as shown to "Power buttons and lid"

From here, you can change the options:

  • Power button action - Changes the hardware power button action
  • Start menu power button - Changes the power button on the Start Menu

You can change the power button to either Sleep, Hibernate or Shut Down, or even nothing for the hardware power button.

The Geek is the founder of How-To Geek and a geek enthusiast. When he's not coming up with great how-to articles, he's probably writing at his personal blog. This article was written on 02/19/07 and tagged with: Windows Vista, Desktop Customization

Comments (40)

  1. Michael

    I tried changing to shutdown but it never takes. I even tried to change to HIGH PERFORMANCE and hit APPLY then OK and it still didn't take. Am I missing doing something?

  2. rob

    Hey there,

    In my copy of Vista the command you gave gives this error:
    "powercfg.cpl,1 Windows cannot find 'powercfg.cpl,1′. Make sure you typed the name correctly, and then try again."

    Also, the Control Panel path is different for me:

    Control Panel -> Power Options -> Change power-saving settings -> Change plan settings (of the plan currently selected) -> Change advanced power settings.

    Then you can do the rest of your steps. Thanks for this.

  3. steve

    where is the "ask me what to do" option?

    Is there a way to tweak that?

  4. Nilesh

    Good work, turn off my laptop by start menu power button work.
    how do i configure sleep button as hibernet or log off.

  5. Scott

    This worked perfectly for me. Thanks for the tip. No thanks to Microsoft for the poor config choice (or is this Dell's doing…) I wonder how many people are wondering why their laptop battery is always drained….

    Thanks again,
    Scott

  6. assive2007

    This website is on top of my list, VERY well bookmarked in a safe place!! Thanks to whoever owns it!

  7. Nick

    I too ask where is the "ask me what you want to do" option as in windowsXP?

    Obviously none of the Vista Usability Testers have kids?

  8. The Geek

    I think annoyance at Vista's shutdown options is widespread…

    http://www.joelonsoftware.com/.....11/21.html

  9. Rick

    Anyone know a way to set this button to "restart" instead? IMHO doing "user" support, they need to reboot more often than shutting down and having this option right up front would be more advantageous. Six of one, half dozen of the other, I guess…

  10. elitemµsician

    Anyone know how to completely disable the start menu power button.
    Or… just simply have it log off insted of going to sleep or shuting down.
    Im sure there are ways of doing things like this… cause I mean Im sure you cant just shut down a public computer.

  11. Rick

    EliteMusician,

    There is a group policy to remove all options: User Configuration -> Administrative Templates -> Start Menu and Taskbar. Locate "Remove and prevent access to the Shut Down, Restart, Sleep and Hiberate Commands" and enable it.

    HTH,
    Rick

  12. elitemµsician

    Thanks Rick… I never knew (or even cared for that matter) how to access all of those options until now. I never needed to until I got labeled the "Tech-Geek" at work.
    Even though It took a little searching to figure out what you were talking about, you've been very helpful. Thanks

    -elitemµsician-

  13. Lawrence Moss

    The reply from Rick, June 27 looks useful but where can I find the commands that he lists starting with User Cofiguration etc. please?

  14. Rick

    Lawrence,

    Click the start orb, then in the "Start Search" box (or Run if you have it configured to be showing) type "gpedit.msc" (w/o the quotes). Click continue when the security dialog comes up. This will bring up the Group Policy Editor, from there just follow the path I outlined in the posting. If you click on the Setting column it will sort them by name making the "Remove and prevent…" option easier to locate.

    HTH,
    Rick

  15. Lawrence Moss

    Rick

    Many thanks for your help

    Lawrence Moss

  16. Diane Stott

    I have a desktop w/ vista. Every time it goes into sleep mode, the computer freezes, and I have to shut it off and restart. Can you help?

  17. Nikolaus Nacz

    Could someone tell me please how can I activate the Password manager in Netscape 9.0b2 when I did not
    let it save the first time it asked me ? My OS is Windows XP Home.
    Many thanks.
    Nikolaus

  18. Tommy

    THANK YOU. This has always been one of those "annoying, but I'll get around to it later" things for a while, glad you have this info posted

  19. Dave

    Thank you very much. This was another one of those nagging frustrations that I never had time to deal with and that gets me to thinking fondly of Microsoft…..

  20. joe

    How do i get the power management tabs back in keyboard and mouse in vista?…i have a aspire 5610z and the tabs were there when i purchased it…but lately i looked and they were gone!!!!!!!!!!!!!!!!!!…THANKS.

  21. Larry

    Is it possible to make the sleep button act as power off. The keyboard I have has a sleep button and in XP it was set to turn off the pc which saved me bending down. I would like the same feature in Vista.

  22. dennis rosario

    how to deactivate the (user-defined activated)in my power plan which is set in high power performance
    easy to drained my battery..im using windows vista…i try to change in Balanced setting still cannot do.

  23. axet

    How to change power button to show "shutdown dialog", like in windows xp. same as you see when you press alt+f4 on desktop?

  24. Jenn

    Hi I have a problem with my dvd burner not reading dvd disc cd's it reads just fine the problem only started a couple of weeks ago on my Acer Aspire T310 running XP Pro

    Thanks for any help you can give me for this problem Regards Jenn

  25. tbp

    Jenn,
    Not sure what your problem is. Does it read DVD's or not?
    BTW, CD is an abbreviation for compact disc.
    I might be able to help you with your problem, but your question might do better on a more appropriate thread.

  26. Teodor

    In response to Rick.
    While acting on Group Policy object "Remove and prevent access to the Shut Down, Restart, Sleep and Hiberate Commands" marginally solves the problem with no "Ask me what to do" screen (it's a big issue fo me too because it's more easy than before to accidentally shutdown the PC which is VERY frustrating for a server though), this basically means you cannot shutdown your computer. You can logoff, but no shutdown. This is very frustrating on its own.
    We just want the confirmation screen after we push the ShutDown button/link in start menu.

  27. Rick

    Teodor,

    I agree that these options need more flexability. If there is an "always confirm shutdown" option, I havent found it yet. In the meantime, you could write a simple app / script to meet your needs, and it doesnt get much simpler than this one…

    Result = Msgbox ("Are you sure that you want to shut down?",4,"Confirm Shutdown")

    if (Result = 6) then
    Set WshShell = WScript.CreateObject("WScript.Shell")
    Return = WshShell.Run("shutdown.exe /f /s /t 30″,1,false)
    End If

    Wscript.Quit()

    Copy and paste that into notepad, save it as something like MyShutdown.vbs, create a shortcut to it somewhere and use that as your shutdown. The "/t 30″ is the countdown, adjust as you see fit. Just a thought. The snippet is far from polished, but seems to work on the box I'm sitting at now.

    To all you VBS'ers who are about to flame my code, its just an example, not an application so please keep your comments to yourself. :P

    Thanks,
    Rick

  28. Teodor

    Rick,
    yes, after some researching, I didn't find such option neither, and I came up to a similar solution as you.
    It is plain old batch file with content similar to this:

    choice /c yn /t 5 /d n /m Shutdown computer?
    if ERRORLEVEL==2 goto noshut
    shutdown /s /t 1
    :noshut

    and similar for RestartMe.bat

    I'm not familiar with VBS, but with C# so maybe using PowerShell will be the preferred way when I get familiar with PowerShell's exact syntax.

  29. Mital

    Change the Windows Vista Power Buttons to Shut Down

    I tried this but when i click shutdown from start menu, the computer still reboots, is there a way to shutdown when i click shutdown or is it problem with vista install? Please help..

  30. Rick

    Hello Mital,

    Can we assume that you "tried this", you mean the steps at the very beginning of this thread? If so, can you please verify that your power options dialog looks exactly like the image at the top (as far as BOTH of those options saying "shut down"). Also, when you click the start orb, is the shutdown button (the button immediately to the right of the Start Search box), is reddish with a power-button logo on it (circle w/ a vertical line).

  31. Mital

    Rick,
    Yes the image above is exactly what i have. Also i click on shutdown button immediately right of start search box. When i click on it the computer reboots instead of shutting down.

  32. Me

    I'm trying to find out how to add the "Ask me what to do" option. Right now, I'm looking for the file on my other laptop (Windows XP) and I will copy it to this laptop (Windows Vista). I've tried the registry but no luck. If I knew what the file name was or even what the file type was.

    Also, does anyone know how to install Windows XP when I have Vista? I'm still used to XP since I've used it since I started using computers. I only had Vista just over a month. It came with the laptop when I bought it, they all had Vista. When I inserted the Windows XP CD, the Install Windows wasn't highlighted like it should be and when I tried to re-format the hdd, it wouldn't let me. I also put the Windows XP CD in while the laptop is booting up and try and install windows that way but still it wouldn't work.

  33. Me
  34. Andrew

    Exactly what I was looking for! Thanks!

  35. Lee

    @ Me (= alisonmxo): so how did you do it ?? Which file does one need to swap with one from XP?

  36. Me

    I didn't find any file or anything yet. I just edit the registry (Vista) to make it say that "Ask me what to do" and took a screenshot.

  37. Me

    I didn't really do anthing yet. I just edited the registry (Vista) to make it say that "Ask me what to do" and took a screenshot. I'll let you know when I fix it. You all I know is you need to get it set up so when you push the power button, it'll open prompt.js (think thats what it is). It'll bring up the pop-up asking you what to do (ex. restart, logoff, shut down etc.)

  38. Lee

    hi Me. Yeah that would be great if we can connect the registry key with the js-script (I also have it here). Would you please tell me the registry key in Vista where I need to start editing and experimenting :) ?

    Thanks,
    Lee

  39. Me

    I don't know how or what to to in the registry at this time. I will continue to investigate it though. When I find out, I'll let you know.

  40. Lee

    well you know you're contradicting yourself, don't you .. :-|


Leave a Comment




Leave your friendly comment here. If you have a computer help question, leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Copyright © 2006-2008 HowToGeek.com. All Rights Reserved.