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:
One way to get a confirmation dialog upon hitting the shutdown button is to enable Shutdown Event Tracker:
You will have to select a reason for the shutdown, like so:
Create the following batch file and use instead.
@ECHO OFF :choice set /P c=Are you sure you want to shutdown[Y/N]? if /I "%c%" EQU "Y" goto :yesplease if /I "%c%" EQU "N" goto :nothanks goto :choice :yesplease shutdown /s /t 10 exit :nothanks exit
Paste this text into notepad, and save it as "shutdown.bat" (include the quotations.) The quotes force it to save as a .bat file.
edit: removed unecessary pause statements