How to Shut Down a Computer Using Notepad

Download Article
Easy-to-follow steps to use Notepad to shut down your computer
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.

  1. How.com.vn English: Step 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. How.com.vn English: Step 2 Type .
    shutdown.exe -s on the first line. This is the command to shut down the computer.
    Advertisement
  3. How.com.vn English: Step 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. How.com.vn English: Step 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. Step 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. Step 6 Click the "Save as type" drop-down menu and select "All Files (*.*)".
    This will allow you to change the file type.
  7. How.com.vn English: Step 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. How.com.vn English: Step 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. How.com.vn English: Step 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.
  10. Advertisement

Community Q&A

Search
Add New Question
  • Question
    Can I use this with cmd?
    How.com.vn English: 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?
    How.com.vn English: 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?
    How.com.vn English: 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
      Thanks for submitting a tip for review!

      Warnings

      Advertisement

      About This Article

      Tested by:
      How.com.vn Technology Team
      How.com.vn 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 466,319 times.
      How helpful is this?
      Co-authors: 21
      Updated: December 26, 2022
      Views: 466,319
      Thanks to all authors for creating a page that has been read 466,319 times.

      Reader Success Stories

      • How.com.vn English: 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?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement