How to ask for confirmation before shutting down Windows
brucine Posted messages 24668 Registration date Status Member Last intervention -
Hello,
I want a message to appear when I press the Windows shutdown button, asking if I'm sure I want to turn off the PC, with a "yes" button that shuts down the PC, and a "no" button that keeps the PC on.
I already have the window that asks the question with the "yes" and "no" buttons in PowerShell.
What I'm missing is the ability to display it when I press the Windows shutdown button and make the choice, without the PC shutting down first.
I don't know if this is possible, but it would help me a lot.
Thanks in advance.
4 answers
Hello,
We can add the automatic dialog that used to exist in the past with a script:
https://winaero.com/create-shut-down-windows-dialog-shortcut-windows-10/
What you sent is for creating a button, but I really want to modify the one in Windows in the start menu. It seems impossible, but I'm asking here just in case.
There is no solution except possibly going through a convoluted way that requires the reasons for the closure and, consequently, allows to go back.
You either need a Windows Pro version for the local policy editor, or install it on Windows Home through a workaround using PolicyPlusLatest:
https://superuser.com/questions/1019041/how-to-make-the-power-button-show-a-prompt-in-windows-10
But in any case, whether you have a policy editor or not, while it's not a button, isn't it enough to just use ALT-F4 to achieve the desired result?
For those who stubbornly use a mouse, you can even add another layer by hiding the start button, still through Open Shell or Winaero Tweaker.