Shut down your computer with Notepad

Author: Frank Hunt
Date Of Creation: 18 March 2021
Update Date: 1 July 2024
Anonim
How to shutdown/turn off your PC using notepad
Video: How to shutdown/turn off your PC using notepad

Content

Windows Notepad is not only a text editor, but also a handy program for programming. You can use simple Windows commands in Notepad to create a file to shut down your computer. This is a great way to save you a few clicks in the future when shutting down your computer, or when you want to play a prank on a friend.

To step

  1. Open Notepad. This is the free text editor present in every version of Windows. You can use it to create a command that will shut down Windows when you run it.
    • You can find Notepad by clicking Start and clicking "Programs" → "Accessories" → "Notepad". You can also click Start, after which your notepad type and press ↵ Enter presses.
  2. Type.shutdown.exe -sin the first line. This is the command to shut down the computer.
  3. Add a timer with the.-tflag. By default, the computer will shut down with a delay of 30 seconds. You can change this by using the -t flag (parameter) with the number of seconds that the delay is allowed to last.
    • For example, create a shutdown command that waits 45 seconds by typing: shutdown.exe -s -t 45.
    • Create a shutdown command that immediately shuts down the computer by typing: shutdown.exe -s -t 00.
  4. Add a message to display. If you want you can add a personal message with the -c flag. With the example above, type: shutdown.exe -s -t 45 -c "message. The message text should be enclosed in quotation marks.
    • For example, you can tell the user how long it will take before the computer shuts down by typing shutdown.exe -s -t 45 -c "The computer will shut down in 45 seconds".
  5. Click "File" and select "Save As". Save the file as a batch file, which Windows can run to run the shutdown command.
  6. Click on "Save as type" from the drop-down menu and select "All files ( *.*)’. In this way you can change the file type.
  7. Remove the extension..txtat the end of the file name. Replace it with .bat.
    • If you don't see the extension of 3 letters, check wikiHow to find out how.
  8. Save the file. A new copy of the file is created with the extension .bat, and with a different icon than a standard text file.
  9. Run the newly created file for the shutdown procedure to take effect. The shutdown will take place according to the set rules you have made.
    • Make sure you have saved everything that needs to be saved before running the shutdown program.