Notepad, Windows' free text editor, is also a competent code-editing program. You can use a few simple Windows commands in Notepad to create a file that will shut down the computer when it starts up. This method is great if you want to save a few clicks on shutting down your computer in the future or if you want to joke around with friends.
Step
Step 1. Open Notepad
Notepad is a free text editing program that comes built right into every version of Windows. You can use it to create programs that when run will shut down Windows for you.
You can find Notepad by clicking the Start menu, then selecting "Programs" → "Accessories" → "Notepad". You can also click the Start menu, type notepad, and then press Enter
Step 2. Type
shutdown.exe -s on the first line.
This is the command to shut down the computer.
Step 3. Add a timer using flag
-t. By default, the process of shutting down the computer will be delayed for 30 seconds. You can change this by adding the -t flag, followed by the number of seconds you want to delay.
- For example, to generate a command to shut down the computer after waiting 45 seconds, type shutdown.exe -s -t 45.
- To create a command that immediately shuts down the computer, type shutdown.exe -s -t 00.
Step 4. Add the message you want to display
If you want, you can add a custom message to the notification that appears when the computer is turned off using the -c flag. With the example above, type shutdown.exe -s -t 45 -c "comments". Your comments must be enclosed in quotation marks.
For example, you can tell the user how much time is left before the computer starts shutting down by typing shutdown.exe -s -t 45 -c "The computer will shut down in 45 seconds"
Step 5. Click "File", then select "Save As"
You'll need to save it as a batch file, which is a file that Windows can execute in order to run the shutdown command.
Step 6. Click the "Save as type" drop-down menu, then select "All Files (*. *)". In this drop-down menu, you can change the file type.
Step 7. Delete the section
.txt from the end of the filename. Replace the ending with.bat.
If you don't see a three-letter file extension, click here
Step 8. Save the file
A new copy of the file will be created with the.bat extension, and the file will have a different icon than a regular text file.
Step 9. Run the file you just created to start the process of shutting down the computer
The computer will shut down based on the rules you created.