PDF download Download Article
Easy-to-follow steps for any PC
PDF download Download Article

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.

Using Notepad to Close & Shut Down Everything

  1. Pull up Notepad in the search bar.
  2. Type “shutdown.exe -s.”
  3. Add a timer if you want by adding -t followed by a number.
  4. Select “file” and save the text as a batch (.bat) file.
  5. Open and run the file to perform the shutdown.
  1. 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. shutdown.exe -s on the first line. This is the command to shut down the computer.
    Advertisement
  3. -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. 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. You will need to save the file as a batch file, which Windows can execute to run the shutdown command.
  6. This will allow you to change the file type.
  7. .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. A new copy will be created with the .bat extension, and it will have a different icon than a standard text file.
  9. 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.
  10. Advertisement

Community Q&A

Search
Add New Question
  • Question
    Can I use this with cmd?
    Community Answer
    Community Answer
    Yes. Just type, "shutdown/s/t 500" or however long you choose. To abort, type, "shutdown /a."
  • Question
    Does this shut down the computer for good or just until I restart it?
    Community Answer
    Community Answer
    It does not shut your computer down for good. It shuts down your computer the same way as if you pressed the off button.
  • Question
    How do I change the icon of this file for a prank?
    Community Answer
    Community Answer
    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.
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Video

Tips

Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!

Warnings

Advertisement

You Might Also Like

Create a Fake and Harmless VirusCreate a Fake and Harmless Virus
Make a Shutdown Shortcut in Windows Create a Shutdown Shortcut on Your Windows Desktop or Taskbar
Automatically Shut Down Your Computer at a Specified Time Schedule a Shutdown for Your PC or Mac Computer
Crash Your Computer Using a Batch File Crash Your Computer Using a Batch File: A Step-by-Step Guide
Shut Down Your Windows Computer from the Command LineShut Down Your Windows Computer from the Command Line
Make a Scary Batch File for Command Prompt Crash a Computer with a Scary Batch File
Shut Down or Restart Another Computer Using CMDShut Down or Restart Another Computer Using CMD
Make an Easy E Bomb Using NotepadMake an Easy E Bomb Using Notepad
Make a Funny Prank VirusMake a Funny Prank Virus
Do a Remote Shutdown for a PC on a LANDo a Remote Shutdown for a PC on a LAN
Close Multiple PC Programs with a Batch FileClose Multiple PC Programs with a Batch File
Create a Harmless Freeze VirusCreate a Harmless Freeze Virus
Make a Program Using NotepadMake a Program Using Notepad
Shut Down Your PC with a Shortcut Key6 Easy Ways to Use Shortcut Keys to Shut Down a Windows PC
Advertisement

About This Article

Tested by:
wikiHow Technology Team
wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, 21 people, some anonymous, worked to edit and improve it over time. This article has been viewed 481,872 times.
How helpful is this?
Co-authors: 21
Updated: March 21, 2025
Views: 481,872
Thanks to all authors for creating a page that has been read 481,872 times.

Reader Success Stories

  • Kolitha Dasanayaka

    Kolitha Dasanayaka

    May 26, 2017

    "Now I know how to schedule my computer to turn off!"
    Rated this article:
Share your story

Is this article up to date?

Advertisement