Is there a way to have a confirmation dialog whenever a shutdown or restart command is not issued by the physical person sitting behind the keyboard?

In other words, whenever a shutdown or restart is not triggered directly from the Start Menu or by hitting the computer's power button.

The reason behind this is because many application installers or updaters decides to force a restart upon completion, sometimes without providing an option to shutdown manually later.

This is much of a hassle for me, since it happens every few days, and sometimes cause me to lose whatever I was working on, with the additional annoyance of having to wait the usual 300 to 400 seconds for the computer to reboot before resuming work.

I have previously tried ShutdownGuard and the Shutdown Event Tracker, although they block all shutdowns and restarts, including those initiated by the user, which is not what I am seeking.

If such thing is not possible, then something that allows all shutdowns but requires confirmation for all restarts would certainly be enough.

  • I don't think this is possible. I'm familiar with the Win32 API shutdown calls, and there's no easy way to distinguish between user and system shutdown requests.
    – user3463
    Commented Jul 29, 2012 at 19:12

1 Answer 1


Found these Stack Overflow links. The first would require some editing for your purposes, but at least it's a working solution:

You could rewrite this in VB or C# pretty easily with WPF and have a MsgBox ask the user, (or just cancel all attempts made by software, and only allow the user to click the Shutdown/Restart button in the start menu).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .