Some things after a while become boring like shutting down PC everytime by going to Windows orb and selecting Shutdown.
In order to shutdown Windows with just a double click every time just like in running a program, what we need to do is create a set of steps and then save those steps as a batch file. Think of batch file as a queue processor, commands given in sequence are executed through batch files so that these commands need not be manually entered everytime.
To create a shutdown, all we need is a single line command that should tell us that the system is shutting down so that any unsaved work can be saved and a time interval after which shutdown will happen.
1. Open notepad and type the below command exactly as shown in the image below :
shutdown /c “PC shutting down in 1 minute, save any unsaved work now or tear out hair later :)” /t 60 /s
What the command above does is shutdown the PC after displaying a message (/c is used to denote comments in ” “, the /t 60 denotes that time till shutdown is 60 seconds and /s is to specify that the system is to be shutdown and not restarted. (In case you need system to restart, just replace /s with /r and it will do just fine).
2. The important part is to save the contents (File > Save As) as a .bat extension with All files as type of files.
3. When saved correctly, an icon indicating that a batch file is created will appear (shut.bat in this case).
4. Now the fun part, just double click the batch file and watch how shutdown is triggered with the funky message that we put in (after the /c part).
5. Gone in 60 seconds, enjoy 🙂