Implement a Shutdown Confirmation?
15,607
One way to get a confirmation dialog upon hitting the shutdown button is to enable Shutdown Event Tracker:
Configure Shutdown Event Tracker on the Local Computer
Since the link above is not up-to-date for Windows 10, the following are step-by-step instructions for Windows 10 (verified with version 21H1):
- Start
gpedit.msc
- In the
Local Computer Policy
navigation pane, expandComputer Configuration
, expandAdministrative Templates
, and clickAll Settings
- In the console pane, scroll down to the list of objects and double-click
Display Shutdown Event Tracker
- Click
Enabled
- Verify that in
Options
,Shutdown Event Tracker should be displayed:
is set toAlways
- Click
OK
You will have to select a reason for the shutdown, like so:
Related videos on Youtube
Author by
Jeremy
Updated on September 18, 2022Comments
-
Jeremy almost 2 years
How do I configure Windows 10 so that it displays a confirmation dialog every time I press the
Shut down
button?Sometimes I would shutdown my computer accidentally, as the sleep button is just above shutdown button, and lose my unsaved work:
-
user about 8 yearsIf such a feature exists, it can most likely be found in the power settings in the control panel.
-
Jeremy about 8 yearsI cannot find it. Are there alternative solutions?
-
user about 8 yearsI don't have any Windows 10 system handy, which is why I only left a comment that I hoped would be helpful. (Seems it wasn't, but that's how it goes at times. Can't be right every time.) Unless I stumble across something helpful, I'll leave actually answering this to others.
-
Jeremy about 8 yearsI guess the solution will apply to all modern Windows(7, 8, 10) OSes.
-
SimonS about 8 yearsDid you use google? there are tons of entries for your problem. I guess this should work, please try it: winaero.com/blog/…
-
Jeremy about 8 years@SimonS Yes I did. I've seen that post but it has nothing to do with my question.
-
SimonS about 8 years@Jeremy how about the answer with 6 upvotes in this thread (even though it's windows 7?) superuser.com/questions/89957/…
-
Ƭᴇcʜιᴇ007 about 8 yearsDisable the keyboard button.
-
Jeremy about 8 years@SimonS All I want is a simple confirmation dialog with yes/no buttons.
-
SimonS about 8 years@Jeremy And all I want is love, seems like we're both not getting what we want :-). No seriously, seems like Microsoft removed this option. I guess you'll have to live with a workaround as I posted in my last comment.
-
Jeremy about 8 years@Ƭᴇcʜιᴇ007 How?
-
Ƭᴇcʜιᴇ007 about 8 yearsThere's plenty of info out there on ways to do it. IE: Disable shutdown key on my keyboard?, Disabling Power button on keyboard, etc.
-
Jeremy about 8 years@Ƭᴇcʜιᴇ007 Ah. What I actually mean is the buttons on screen. i.imgur.com/2Iph8RQ.png
-
Ƭᴇcʜιᴇ007 about 8 yearsAhh gotcha! When you said you were accidentally hitting the power button because it was right above the sleep button, I thought you were talking about a physical keyboard button (as that's come up lots in the past ;) ).
-
ths about 8 yearswait, does that mean that win 10 doesn't have a default shutdown button action anymore, like win 7? and then they put the options so close you have trouble selecting one? that's... i don't even.
-
ths about 8 yearsdo they at least offer keyboard shortcuts? we can't see them anymore of course, since, in their infinite wisdom, they decided not to show the underlined characters anymore per default.
-
Jeremy about 8 years@ths As you can see from the image in my post. I don't have problem selecting those buttons but, when I'm in a rush I may click the wrong button.
-
Chris Peacock over 5 yearsI can't believe this was removed from Windows. It's one of the things that really infuriates me about it, along with Windows automatically restarting itself to appy updates with no warning, when left for a period. It's far too easy, as the OP says, to accidentally press the Shutdown button; there's no way to cancel the shutdown, neither does it seem to allow running applications (e.g. with unsaved documents) to halt the shutdown, as it used to.
-
-
Jeremy about 8 yearsI'm not asking how to code the confirmation dialog. It'd be nice if the bat file can be ran when I click the shutdown button.
-
Canadian Luke about 8 yearsWhy would you pause before exiting? Why have the exit statements? The script would close anyways
-
Narzard about 8 years@CanadianLuke you're right, it was a copy paste from something else i had and I didn't remove them. I have edited to reflect the correct script.
-
Narzard about 8 years@Jeremy I cannot find any information on editing the button for anything custom. Only making it perform different built-in functions.
-
Jeremy about 8 years@Narzard ahh.. I hope Windows will implement this feature.
-
Jeremy about 8 yearsThis is same as SimonS' answer in comment. I don't want to choose a reason every time I shutdown my computer.
-
Nassbirne about 8 yearsWell you can just click "Continue" without changing the default reason.
-
Jeremy about 8 yearsI am looking for a better sulution. If there is none, I'll accept your answer. Btw, what are the uses to provide a reason before shutting down?
-
Nassbirne about 8 yearsThis is mainly a feature of the server versions of Windows which have it enabled by default. It generates entries in the event log which can be useful for system administrators.
-
Bort about 8 yearsThis does exactly what you asked for: Confirmation on shutdown. You don't even have to select a reason from the reason box.
-
xtian almost 5 years@Jeremy, I want to use confirmation to avoid acidentally shutting down my work system after telecommuting from home--also using Windows 10. In two years of telecommuting, I've just done this for the first time yesterday, and on Friday there was no one left to turn it back on.
-
xtian almost 5 yearsThe option
Local Computer Policy > Computer Configuration > Administrative Templates > System > Display Shutdown Event Tracker
isn't available on Windows 10 Pro v1809 -
Tydaeus over 3 years@xtian and others noticing the option isn't available: mine was semi-hidden.
gpedit.msc > Local Computer Policy > Computer Configuration > Administrative Templates > All Settings > Display Shutdown Event Tracker
worked for me.