How to force a "confirm shutdown" in Windows 7

9

5

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.

Vokuhila-Oliba

Posted 2009-12-31T17:02:56.167

Reputation: 3 547

Question was closed 2010-01-01T07:07:17.533

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 – 2016-04-20T12:24:09.883

Answers

4

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.

DanMK

Posted 2009-12-31T17:02:56.167

Reputation:

ok. But what if I want to shutdown? – Vokuhila-Oliba – 2010-01-01T12:11:44.843

... 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 – 2010-01-02T11:42:51.990

@DanMK: This question has been closed. So it would be nice if you post your answer into: http://superuser.com/questions/89894/windows7-howto-force-a-do-you-really-want-to-shutdown-dialog.

– Vokuhila-Oliba – 2010-01-02T11:50:43.907

8

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

In Registry Editor, navigate to

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Reliability

Name:ShutdownReasonUI (REG_DWORD)

1=enable 0=disable

alt text

p.campbell

Posted 2009-12-31T17:02:56.167

Reputation: 3 938

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 – 2017-02-22T16:35:06.643

not working on windows 10 as well – Wasim A. – 2017-03-17T17:34:06.303

what I want is simply an XP-alike dialog asking "really shut down? Yes/No". – Vokuhila-Oliba – 2009-12-31T19:42:31.897

3

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!

Mr Furious

Posted 2009-12-31T17:02:56.167

Reputation: 156

@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 – 2009-12-31T17:25:22.033

How about modifying the local machine policy then? – None – 2009-12-31T18:02:36.280

That is what I also thought. But I am not sure which entry to use. – Vokuhila-Oliba – 2009-12-31T18:23:10.107

3

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

goldPseudo

Posted 2009-12-31T17:02:56.167

Reputation: 2 100

not works for windows 10 – Wasim A. – 2017-03-17T17:36:47.743

3

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.

Molly7244

Posted 2009-12-31T17:02:56.167

Reputation: