Something that has happened to all of us at some point, with more or less frequency depending on how clueless one is, is turn off the computer without having saved the work being done. Depending on the application in question, it may be more or less easy to recover it, but once the order is given to turn off the equipment the margin it leaves Windows it is very meager.
If you have several programs open, a window will warn you and here you have to react quickly, because the shutdown process continues forward. Windows It will take a few moments to close everything by forceafter which you will lose the option to stop the process. Or it may not even prompt you and jump directly to the ‘turning off equipment’against which the user can no longer do anything.
For these reasons it may be useful to have a way of delay the shutdown process and give the user time to reacteither canceling it or calmly saving the work done. This trick, which is collected on the specialized portal Genbeta, consists of the creation of a custom executable indicating the time that Windows will take to shut down once the order is given. The only thing you will need for this is the Notepad of Windows.
The command you are going to have to use is ‘shutdown -s -t 60’without the quotes, and in which the number is the seconds that the action will take. You can put the amount that seems best to you. This command must write it to a Notepad file and then save it as a .bat file. This is the extension, ‘bat’ is short for ‘batch file’, so a type of text file that contains a series of commands that are executed sequentially in Windows. These commands are interpreted by the Command Prompt-the traditional Microsoft command console, although the more modern one can also be used Windows Terminal– and make it easy to automate tasks.
But since Notepad You cannot save a text file as .bat, but the change must be made later from the Windows Explorer. We explain all the steps you must follow:
- Open the Notepad of Windows.
- On a blank document, write ‘shutdown -s -t 60’without the quotes and with the number of seconds you want, 60 or another, and save the document in the Deskwhere you will have it on hand to use.
- Open the Windows Explorer and select Desk in the left column.
- Click on the ellipsis in the top toolbar of Explorer. From the drop-down menu, select Options.
- in the window Folder optionsclick the tab See.
- Scroll through the list of options Advanced settings and uncheck the option Hide file extensions for known file types. This is what will allow you to modify the extension. Select Accept.
- Double-click the name of the previously created executable to rewrite it. Delete the extension .txtwhich is now displayed, and writes instead .bat. Press the key Intro on your keyboard to set the new file extension. Windows will inform you that you are going to modify the file type; confirm the operation.
Now you just have to double-click on the executable you created to start Windows shutdown with the delay you set. If you have open documents, you can save them without problems.
But if you want to cancel the shutdown, you must do it through the Windows Command Prompt by following these steps:
- Press the key combination Windows + R to open the command console.
- in the window Executewrites ‘shutdown /a’without the quotes, and click Accept.