New
#1
Prevent Windows shutdown
How is possible to stop windows shutdown if I accidentally click Shutdown in start menu?
How is possible to stop windows shutdown if I accidentally click Shutdown in start menu?
Instructions:
https://www.howtogeek.com/howto/wind...windows-vista/
Abort shortcut:
Target:C:\Windows\System32\shutdown.exe -a
Start in:C:\Windows\system32
choose icon:%SystemRoot%\system32\SHELL32.dll
Here's a shutdown and restart batch file with yes check before action & shutdown.ico icon
Shutdown Batch File with Icon.zip
open zip & open READ ME FIRST
I have accidently hit Shutdown instead of Log Off before. How is there time to run any of the aborts above? You have maybe five seconds until Shutdown. Just curious.
5 seconds isn't enough time.
If you look at the batch file I uploaded, right-click edit, look for
Shutdown -r -f -t 5
Shutdown -s -f -t 5
-t is shutdown timer in seconds, currently 5.
both places, change to seconds you wish
save as type: All files (*.*)
shutdown.bat
that saves it as it is, a batch file
Here's the regedit:
If you don't feel totally comfortable editing this key, backup the registry, or full disk image backup to be on the safe side.
Registry - Backup and Restore - Windows 7 Help Forums
- Click type regedit
- Click regedit.exe when it appears
- Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
- In the right pane, double-click WaitToKillServiceTimeout
- Change it to what you wish; default is 10000 is 10 seconds, 15000 is 15 seconds, 20000 is 20 seconds, etc.
- Click OK
- Close the folder levels you opened to return to where you began. (Computer and 5 folders below)
Shutdown set to 15 seconds
15 Second Shutdown Batch File with Icon.zip
Last edited by Snick; 23 Apr 2019 at 07:31. Reason: add regedit info
Hi Snick,
The READ ME files in both your batch files are of the File type. It might be better to make them .txt files so the user doesn't have to select a program to open them with!
Just create a hotkey shortcut. I hate the built in windows hot keys because you have to press ctl and alt plus another key, which is hard to do very quickly. I suggest you use autohotkey and create just one file called "abort.ahk", which contains only this
#a::
Run shutdown -a
return
which maps the keyboard combination of windowskey+a to run an immediate shutdown abort
Beginner Tutorial | AutoHotkey