How to Shut Down a Computer with Notepad: 9 Steps (with Pictures)

Table of contents:

How to Shut Down a Computer with Notepad: 9 Steps (with Pictures)
How to Shut Down a Computer with Notepad: 9 Steps (with Pictures)

Video: How to Shut Down a Computer with Notepad: 9 Steps (with Pictures)

Video: How to Shut Down a Computer with Notepad: 9 Steps (with Pictures)
Video: Flavor Friday Episode #6 - Making Sugar Water 2024, December
Anonim

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

Shut Down a Computer Using Notepad Step 1
Shut Down a Computer Using Notepad Step 1

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

Shut Down a Computer Using Notepad Step 2
Shut Down a Computer Using Notepad Step 2

Step 2. Type

shutdown.exe -s on the first line.

This is the command to shut down the computer.

Shut Down a Computer Using Notepad Step 3
Shut Down a Computer Using Notepad Step 3

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.
Shut Down a Computer Using Notepad Step 4
Shut Down a Computer Using Notepad Step 4

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"

Shut Down a Computer Using Notepad Step 5
Shut Down a Computer Using Notepad Step 5

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.

Shut Down a Computer Using Notepad Step 6
Shut Down a Computer Using Notepad Step 6

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.

Shut Down a Computer Using Notepad Step 7
Shut Down a Computer Using Notepad Step 7

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

Shut Down a Computer Using Notepad Step 8
Shut Down a Computer Using Notepad Step 8

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.

Shut Down a Computer Using Notepad Step 9
Shut Down a Computer Using Notepad Step 9

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.

Recommended: