Possible Duplicate:
Windows7: Howto force a “do you really want to shutdown?” dialog

Whenever I choose Shutdown from the Start Menu, Windows 7 begins shutting down immediately.

This is really annoying because very often I only wanted to choose "Log Off", but I keep hitting "Shutdown" by accident.

Is there a way to change this behavior? E.g. Could I force Windows 7 to display a dialog asking "Do you really want to shutdown?"

Environment: I am running Windows 7 Professional 64-bit.

  • You can get exactly the sort of prompt you're asking for from a command prompt/batch script with taskkill /IM explorer.exe something to build up from. – Cestarian Apr 20 '16 at 12:24

You can right click on the Windows button, select properties and assign the function of the "shutdown button" to default to Log Off. This was you may accidentally log off instead of shutting down but it is not as detrimental as shutting down rather than logging off.

| improve this answer | |
  • ok. But what if I want to shutdown? – Vokuhila-Oliba Jan 1 '10 at 12:11
  • ... oh, I see: when you assign "Log Off" to the "Arrow Button", then "Shutdown" becomes part of the "Arrow Button Menu" and "Log off" disappears from the "Arrow Button Menu". – Vokuhila-Oliba Jan 2 '10 at 11:42
  • @DanMK: This question has been closed. So it would be nice if you post your answer into: superuser.com/questions/89894/…. – Vokuhila-Oliba Jan 2 '10 at 11:50

Not exactly what you were looking for, but you could Enable the Shutdown Event Tracker.

In Registry Editor, navigate to


Name:ShutdownReasonUI (REG_DWORD)

1=enable 0=disable

alt text

| improve this answer | |
  • what I want is simply an XP-alike dialog asking "really shut down? Yes/No". – Vokuhila-Oliba Dec 31 '09 at 19:42
  • I attempted this on Windows 7 Ultimate 64bit and it did not work. Have you actually tried it? I had to use the group policy editor to do it. – Dakusan Feb 22 '17 at 16:35
  • not working on windows 10 as well – Wasim A. Mar 17 '17 at 17:34

Are you aware that immediately to the right of the shutdown button (in the start menu) you can press the arrow and you'll find the dialog tree you're looking for? You can also access the "log off" button by pressing ctrl-alt-del.

Finally, if you want it to appear on the start menu without clicking the arrow, you can adjust the local machine policy by typing in the search/run field, "gpedit.msc" and pressing enter. Then navigate to "User Configuration", "Administrative Templates", "Start Menu and Taskbar". Modify the policy "Add Logoff to the Start Menu." Change it to enabled. Reboot.

Good luck!

| improve this answer | |
  • @Furious: I know that "log off" is attached to the arrow on the Shutdown Button. But that's not what I am asking about. To clarify the question: Very often I'm hitting the Shutdown Button by accident when I wanted hit the Arrow for access to "log off". – Vokuhila-Oliba Dec 31 '09 at 17:25
  • How about modifying the local machine policy then? – Mr Furious Dec 31 '09 at 18:02
  • That is what I also thought. But I am not sure which entry to use. – Vokuhila-Oliba Dec 31 '09 at 18:23

You can remove the Windows Shutdown button from the start menu and use this utility instead

The Beyondlogic shutdown utility hand provides:

  • Options to shutdown, power-off, reboot, suspend, hibernate, log-off or lock the workstation.
  • Actually shutdowns ACPI Compliant computers including WinNT4 with the hal.dll.softex Hardware Abstraction Layer.
  • Ability to display optional message of a maximum 300 characters.
  • The shutdown dialog will appear on the active window, should it be the login window, login screen saver, logged in user's desktop, or on a locked workstation.
  • Option to allow the user to cancel the operation. (This can be greyed out)
  • Option to prevent shutdown action occurring on logged-on computers giving your users the flexibly to run lengthy processes overnight without being disturbed.

I'm using this with Windows 7, works a like a charm, just create a few batch files for your preferred actions, e.g. Shut Down, Log Off, Hibernate (set the time you may need to cancel this operation) and place shortcuts in the start menu, taskbar on the desktop or your favorite launcher.

alt text

Tip: rename the file (e.g. shtdwn.exe) as shutdown.exe already exists in Windows if you want to use it from the commandline.

| improve this answer | |

I've not used it myself, but ShutdownGuard was designed to handle exactly this situation. (Binary downloads are available on the releases page.)

| improve this answer | |
  • not works for windows 10 – Wasim A. Mar 17 '17 at 17:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.