Question Way to cancel Windows shutdown if you accidentally press the shutdown button?

Dec 23, 2018
19
1
15
0
So sometimes when I want to press the sleep button to put my computer to sleep, I accidentally press the shutdown button. This happens A LOT more than you'd think. Is there any way to cancel a Windows shutdown if you've already pressed to shutdown button? I've searched everywhere and only found how to cancel an automatic shutdown, not to cancel a manual shutdown.
 

gardenman

Admirable
Herald
I don't think so. Shutdown immediately starts closing services and other background programs, foreground programs, etc. If you were able to stop it half way through, you would likely find that many of your programs no longer work the next time you use it because services and other software required to use them are closed out.

What you can do is create a shortcut (on your desktop or taskbar) to place your PC into sleep mode that so that you no longer have to use the start menu and won't accidentally choose the wrong option.

There's 2 ways to have a shortcut place your PC in sleep mode. The first requires no extra downloads but you must turn hibernate off. The second way requires a small download.

Method 1:
To create a shortcut to sleep, first you have to make sure that hibernate is turned off. This can be done with command prompt by typing the following:
powercfg.exe -hibernate off
You can always reverse this later by typing the following:
powercfg.exe -hibernate on

Once it's disabled, create a shortcut and use the following command:
rundll32.exe powrprof.dll,SetSuspendState 0,1,0

Method 2:
If you don't want to change hibernate on your system, you can use another program from Microsoft called psshutdown.
Download: https://docs.microsoft.com/en-us/sysinternals/downloads/psshutdown
And use the following command in a shortcut:

psshutdown -d -t 0

Reference: https://superuser.com/questions/42124/how-can-i-put-the-computer-to-sleep-from-command-prompt-run-menu
 
As another option, you could set your computer's physical power button to act as a hibernate button instead, and use that to hibernate the PC. There should be an option in Windows "Power Options" to control what happens when you press your system's physical power button.
 

Colif

Titan
Moderator
As another option, you could set your computer's physical power button to act as a hibernate button instead, and use that to hibernate the PC. There should be an option in Windows "Power Options" to control what happens when you press your system's physical power button.
Not sure if its actual physical button or just what windows does if you press the shutdown button in the power menu. Most of its choices affect windows actions in that menu. But you in the right area :)


He could set it to go to sleep when button is pressed, which is what he wanted

right click start
choose power options
in settings, choose Additional power options from right hand panel under related settings
click Chose what the power button does from the left hand panel

under power button settings drop down, choose Sleep and click save changes
that way whichever button you choose PC will actually go to sleep.

its possible hibernate is a choice here too, I have it turned off so I can't tell.

You can create a desktop shortcut to actually turn PC off - link - though you may want to turn fast startup off if you do this method - other link
 
Last edited:

ASK THE COMMUNITY

TRENDING THREADS