Edit Article

wikiHow to Shut Down a Computer Using Notepad

Community Q&A

Notepad, Windows' free text editor, is also a competent code editing program. You can use some simple Windows commands in Notepad to create a file that will shut down your computer when you run it. This is great if you want to save some clicks for future shut downs, or you want to play a prank on a friend.


  1. 1
    Open Notepad. This is the free text editing program that comes with every version of Windows. You can use it to create a command that, when run, will shut down Windows for you.
    • You can find Notepad by clicking the Start menu and selecting "Programs" → "Accessories" → "Notepad". You can also click the Start menu, type notepad, and press Enter.
  2. 2
    Type .shutdown.exe -s on the first line. This is the command to shut down the computer.
  3. 3
    Add a timer by using the .-t flag. By default, the shutdown process will be delayed by 30 seconds. You can change this by using the -t gflag with the number of seconds you want to delay.
    • For example, to create a shutdown command that waits 45 seconds, type shutdown.exe -s -t 45.
    • To create a shutdown command that shuts the computer down immediately, type shutdown.exe -s -t 00.
  4. 4
    Add a message to be displayed. If you want, you can add a personalized message to the shut down notice by using the -c flag. Using the above example, type shutdown.exe -s -t 45 -c "comment". The comment must be in quotes.[1]
    • For example, you can let the user know how long until the shutdown begins by typing shutdown.exe -s -t 45 -c "Computer will shut down in 45 seconds".
  5. 5
    Click "File" and select "Save As". You will need to save the file as a batch file, which Windows can execute to run the shutdown command.
  6. 6
    Click the "Save as type" drop-down menu and select "All Files (*.*)". This will allow you to change the file type.
  7. 7
    Delete the ..txt from the end of the file name. Replace it with .bat.
    • If you don't see the three letter file extensions, click here.
  8. 8
    Save the file. A new copy will be created with the .bat extension, and it will have a different icon than a standard text file.
  9. 9
    Run the newly-created file to run your shutdown process. The shutdown will occur according to the rules you created.
    • Make sure you've saved anything you need to before running the shut down program.

Community Q&A

Add New Question
  • How can I do this to other people's computers?
    wikiHow Contributor
    1. Use a USB stick to put the file on the other person's computer and initiate it. 2. Email them the file (or send it via other forms of communication) and persuade them to open it.
  • How do I change the icon of this file for a prank?
    wikiHow Contributor
    Rename the shortcut to what you want it to be called. Right-click, go to Properties and press "Change Icon". Press "Browse" and look for a suitable icon.
  • How do I know when my PC is going to shut down?
    wikiHow Contributor
    There will be a message on your computer that pops up.
  • Does this only work on Windows computers?
    wikiHow Contributor
Ask a Question
200 characters left


  • Do it on your own risk. Someone might get REALLY angry at you.. And rage.

Article Info

Categories: Basic Computer Skills | Windows

In other languages:

Español: apagar una computadora utilizando el Bloc de notas, Italiano: Spegnere un Computer Utilizzando Notepad, Русский: выключить компьютер при помощи Блокнота, Português: Desligar um Computador Usando o Bloco de Notas, Deutsch: Mit Notepad einen Computer ausschalten, Bahasa Indonesia: Mematikan Komputer dengan Notepad, Français: éteindre un ordinateur avec le bloc notes, Nederlands: Je computer afsluiten met Kladblok

Thanks to all authors for creating a page that has been read 229,053 times.

Did this article help you?