Use Notepad(.bat) to Shutdown your PC(Windows Only)


Today we shall see some tricks to shutdown your computer by clicking on a file that you will be creating, using notepad or any other text editor.

Open a notepad. Save it as ILOVEU.bat (any name with file extension .bat), now copy and paste below codes into the notepad and save it again..

@echo off
echo hey wana be friends?
echo did u say no???????????
echo u r hacked
echo Type some message!
shutdown -s -t 30 -c “f*ck off”

As soon as someone clicks on this .bat file, these below popup’s will be displayed..


Other options that you can use along with the shutdown command are :
To shutdown computer -> “shutdown -s”
To restart computer -> “shutdown -r”
To logoff computer -> “shutdown -l”
To halt a restart/shutdown –> “shutdown -a”
You can use all these commands directly in DOS prompt or in a script.

You can add some more features to this notepad by reading the help topics in your dos prompt.

Just type help after you enter the dos prompt ( C:\>help ).

Not recommended:
If you remove the pause statement from above code and put this file in the startup( C:\Documents and Settings\All Users\Start Menu\Programs\Startup or C:\Documents and Settings\current user\Start Menu\Programs\Startup ) folder, then your computer will shutdown(automatically) when this file loads at startup.

This article is written to teach you the method to troubleshoot your computer yourself, if someone uses this technique and creates problem in your computer.

Just enter into the dos mode(pre-boot mode, using any bootable disks), and search for any file with .bat extension in Startup folder. And if found, just delete it and restart your computer and it will work normally 🙂

These type of files are being sent by some anonymous people in IMs and also as attachments in emails. This could create some irritating problem and you may loose some data on your computer that you have not saved. So be careful when you get a file with .bat file extension. Better not to click on it.

23 thoughts on “Use Notepad(.bat) to Shutdown your PC(Windows Only)”

  1. Great blog here have just found it sorry to say, but at least I have found it by way of Shafar’s blog Tips Blogger(which is a great blog). Good tips and precautions on the shut down cp, and beware of dot bat! Thanks for the heads up!

  2. its doesnt work. once it gets to the part where it suppoe to shut down it just leaves the promt and nothing happens after that. what now????

  3. @darksentry, hmm..its working perfectly for me.
    Do one thing, replace the last line in the notepad by shutdown -s
    Remove -t 30 -c “f*ck off” from the last line and try to run the .bat file and tell me, whether its working or not.

    You should be using Windows OS only!

  4. This technique is never gonna work in a Notebook only for PCs, tried many (differnt platforms) times but no responce after runing the script.
    — but here is another tip i got somewhere
    >>> right click on your desktop and select New->Shortcut
    >>> where u are asked to enter the Location type shutdown -s -t 50 -c “f*ck off”
    >>> and the name of the shortcut u’l decide
    >>>thats it, run it and seat back & see

    1. @anonymus, It does work on Vista. Try the commands directly in the command prompt. I have upgraded to Windows 7 and it works amazingly well in Windows 7 too.

  5. I was wondering is there anyway to change the file name, or make it appear to be something different than .bat… Like oh say .jpg? I can create my own icon and change the icon to hide/mask some of it, but can’t figure out how to change the file name extension.

    1. @Sora, No you can’t change the file extension. If you change the extension from .bat to anything else, this wouldn’t work as described in above article.
      You can only change the file name. However you can change the file icon to something else and people will usually not see the file extension before opening it. Most of us determine by seeing it’s icon!

  6. @Noe, Which operating System are you using ?

    Directly try this out: Open command prompt. and type: shutdown -s -f -t 100 or simply type shutdown -s

    If that works, then you’ve done something wrong while typing the commands in the .bat file explained in the able article.

    @venkat, thnks to you too, for visiting our blog.

  7. I am using windows 8, and I am opening the bat file via a VBScript. After proceeding past the 2nd message in the Cmd prompt, it zooms past a bunch of text and closes itself. No message box, no nothing. My delay was set to 1 minute, and nothing happened. any help? I edited the messages such as “wanna be friends”, etc, and in one case, I removed the “Type some message!”. What am I doing wrong? Is it the operating system? Thanks!

Leave a Reply