At many times, we are in a situation that we may need to automatically shutdown our computer, without using any third party software.
There are few very simple ways you can achieve this
1. Using Run Dialog
Press Ctrl + R on your keyboard to open “Run” Dialog box and put the following code in there and press enter.
shutdown /t 600 /s
What Run does is, executes the given code inside the windows
2. Using Batch Script
If you would like to shedule a shutdown very often, then you can also save the above code into a file and make it work like a script!
- Open notepad and write the code above with your desired timer.
- Click ‘Save As’ and enter file name as ‘shutdown.bat‘ or whatever name you like with .bat in end as the extension.
- Select ‘All Files’ from the dropdown in ‘Save as type’ as shown in the image below so that the file is not saved as a text file.
- Choose the location, or save it on your desktop.
Now your batch script is ready! Whenever you will open that script, windows will schedule the shutdown in specified time.
What is a batch file?
A batch file is like a script file in Windows. It consists of a series of commands to be executed by the command-line interpreter, stored in a plain text file. More at Wikipedia
If you have any questions feel free to let us know in comments 🙂