How to ask for confirmation before shutting down Windows

Toto -  
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

Panth33ra Posted messages 23104 Registration date   Status Member Last intervention   Ambassadeur 2 361
 

Hello,

Which version of Windows? ... Windows 10 or Windows 11.


0
brucine Posted messages 24668 Registration date   Status Member Last intervention   4 143
 

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/

0
Toto
 

It's mainly for Windows 10, and if possible Windows 11

0
brucine Posted messages 24668 Registration date   Status Member Last intervention   4 143
 

See what I put in <2>.

The option also exists graphically in Winaero Tweaker and for those who, like me, get hives from the default Windows 10/11 menu, in Open Shell.

0
toto
 

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.

0
brucine Posted messages 24668 Registration date   Status Member Last intervention   4 143
 

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.

0