Introduction: Slightly More Advanced Basic Batch

Picture of Slightly More Advanced Basic Batch

Step 1: SHUTDOWN Command

Picture of SHUTDOWN Command
This command is the Funnest command there is, and one of my personal favorites!

I use it mainly when a virus scan is going on, and I want the computer to shutdown afterwards.

But occasionally, when I get the chance, I use it to mess with my friends. ;-D

Though you Do need Administrative properties to run it.

The command goes like this:

SHUTDOWN -S -F -T 900 -C "Insert Message Here."

Go ahead, try it out!

shutdown is the beginning of the command.

-S means "Shutdown" if you substitute it with an -r then it would "Restart"

-F means "Force Programs to Close"

-T means "Timer" as in, how much time, in seconds, before the computer shuts down.

-C means "Message" which is kinda weird, cause message doesn't start with a c. Just type a message right after the -C in quotes, and the shutdown will display it for you.

I love pulling this one on people.
They'll be like "Hey {Neodudeman} can you fix my computer?"
And I'll say "Sure! Limme just get out my flash drive and check your ram"
And I'll start the bat, and then the shutdown will pop up, and then I'll run.

lol, good times had by all!

To stop the shutdown, simply type in:


-A means "Abort"

Neat eh?

Step 2: @ECHO OFF/ON Command

Picture of @ECHO OFF/ON Command
The ECHO OFF/ON Command.

This command will either turn ON, or OFF the command you put in a batch file from showing itself.

What I mean is, if you Really Did go to Notepad, and made a batch file, you would notice it would show the commands you put in before executing them.


If you typed "shutdown -s -f -t 900 -c "Insert Message Here."" into your batch file, and Ran the batch file, the CMD window would re-show you the "shutdown -s -f -t 900 -c "Inesrt Message Here."" and would probably give it away if you were trying to trick a friend.

By typing in

Before the shutdown command, it would not show "shutdown -s -f -t 900 "Insert Message Here."" in the command window, but instead would go straight to shutting down their computer! Yay!

The @ symbol before the ECHO command means that the ECHO command will stay throughout the whole batch file unless turned on again. Without the @, it will only apply to the command directly after it.

ECHO can also be used to relay a message aswell


ECHO Your computer is working fine.

Will have the Command window say: "Your computer is working fine."
Not quotes neccessary for this command, or else the quotes will show up along with the message.

This can be used to disguise your shutdown file, and make it seem like it is fine, as in this command below:

Will scare the crap out of any un-tech-savy person!

Step 3: PAUSE Command

Picture of PAUSE Command

In the last stop, you may have seen me use the PAUSE command.

I mainly use this command so that the Command Prompt will stay open long enough for a user to read the ECHO.

If you have been using Batch, as you should be, you will have noticed that the Command window will close automatically if the Batch is not run from the Command Prompt itself.

The {{{
}}} comes in handy in these situations.

It does as its name implies! It Pauses until the user has pressed any key.

As said before, I use this to keep the Command Prompt open so people can freak out about the messages they see. ;-)

Step 4: BAT2EXE: Hiding Your Haxing

Picture of BAT2EXE: Hiding Your Haxing

Ok, so you've made a nice lil shutdown Batch for yourself, but now how do you go about keeping the file a secret?

Sure, you could name the .bat to something like "Anti-Shutdown.bat" or something, but you can still read it, and edit it by Right-Clicking and selecting "Edit"

The safest way is to make your .bat into a .exe!

Yes! Perfect! That'll keep it hidden!

But how do you do that?

You use a Bat to Exe converter from

It's a pretty neat website, actually, because they have an Online batch converter as well, in case you're paranoid about downloading files from the internets.

I've uploaded the file to Instructables for your convenience, but you can simply download the original from, or even use their online version.

That's it for this edition!



Newbie To Profession (author)2014-03-03

Can anyone mail me all the commands and how it is used? I am gonna creating a tutorial for noob soon.. as soon as i understand all the code. I am a noob but a fast learner

Dude, you can just go to cmd and type 'help'. It'll show you all the commands and what they do. That's how I found out most stuff.

Seban88 (author)Seban882014-04-29

you can also find out about those commands' parameters by adding '/?' at the end. For example, to find out about the parameters of the shutdown command, you just type: "shutdown /?".

Seban88 (author)2014-04-29

'C' in 'shutdown -c' means comment btw

rhafiz (author)2013-05-18

can anyone give me a tutorial on the all the commands i know the basic ones like echo off,echo,pause thats it :(
lol im a beginner

J.W (author)2007-09-09

bloody noobs, none of you know nothing about programming, you just wanna make viruses.

themasterpyro (author)J.W2007-09-21

ummmm isnt that why we learn programing in the first place?so we can crash the whole world whenever we want as if its a pass time?

What about the thrill of creating something that has never been done before? Setting the new standard for the world around us? Advancing through the tiers of history to bring forward a new age in technology?

Am I the only one who despises "bathc hackz"?

Prof. Pickle (author)2012-12-19

All fork bombs are the same in my opinion, I don't see why people keep posting them.

Izzyz (author)2009-02-17

Type This In One It's A MAJOR FORK BOMB if you use it you will have to shut down the computer by holding the button for four seconds or unplug the computer here it is: :top start start start start start start start goto top

flashcactus (author)Izzyz2009-10-25

that one is really esy to kill.
you just have to kill one process and it stops.
the cmd windows don't do nothing
but if u make something like this:

set x=%0
start %x%
goto top

it will be a much more evil one and harder to kill because EACH new program will replicate making new programs that make new programs that make new programs that make new programs that make new programs that ma.............

so to stop this one you should kill ALL the bombs in one time which is really hard to do...

Prof. Pickle (author)flashcactus2012-12-19

Taskkill /IM cmd.exe

Problemo solved.

NetworkNinja (author)Izzyz2009-04-16

This is all you need for a killer fork bomb: @echo off :bomb start goto bomb the @echo off disables showing tour commands :D you also only need one "start" cuz it infinitely loops

Files (author)NetworkNinja2010-08-17

Not really a fork bomb...

kroq-gar78 (author)Files2011-05-13

then what is a fork bomb If the above one isn't? A fork bomb is a denial of service attack by creating a process that "forks" another process, therefore recursively creating an "infinite" amount of processes until the computer/device hangs,freezes, or crashes.

this is NetworkNinja's code:
goto bomb

karmakid732 (author)NetworkNinja2009-05-10

another fork bomb @echo off :start start /MAX CMD GOTO :start

Pie Ninja (author)Izzyz2009-05-21

No you don't, just press the pause/break button, then hold down alt+f4.

kroq-gar78 (author)Pie Ninja2009-08-16

i think it focuses to the newly created window automatically, so i think that won't work

kroq-gar78 (author)Izzyz2009-08-16

don't put a lot of starts. there is no difference between lots of starts and 1 start if it is recursion

uNiq1 (author)2007-03-24

I loved the first guide (basics) and now this one I ENCOURAGE YOU to make more because all these virus makin and fun annoying batch guides assume you know the basics but your tutorials are very easy to understand and send the message across i used to be into hacking and basics of comp and then i kind of got out. but because of your guides im hoping to get back in and your guides are intresting. If you have any websites you know that have guides like yours please reply

messmaker (author)uNiq12010-08-20

Any ideas on what tutorials i could make? give me an idea, and ill make it =] or do my best anyway x]

Prof. Pickle (author)messmaker2012-12-15

I have a tutorial idea for you.

Make a tutorial based on the 5 most hardest commands to fully understand.

I have the first couple:

...And then two others.

Have fun!

leggomylegoeggo (author)2011-05-04

my friend showed me this;
for /l %%n in (1,1,____) do md %%n (inset a number for the ___)
it will make however many empty folders as you specify in the location that th file is in. my question is how does it work? "what does it mean?!"
*ahem* sorry. reference to double rainbow song..

Well, if you still need an answer...

Firstly, the FOR command does a command for something in a file, string or command. A basic example of how the FOR command works is as follows:
FOR %%variable IN (set) DO command

The L switch replaces the "set" section with a start-step-end section.

FOR /L %%I IN (0,1,10) DO @ECHO %%I

The script will output the following:

Can you guess why?


tycrooks69 (author)2008-11-20

lol how do i send a command like this so that it comes up on someone elses computer like how do i make this work on the guy next to me

@echo off
Echo Press any key for authorization code
shutdown -s -f -t 5 -c "LOLLERSKATES!"

elixamarie (author)tycrooks692012-10-04

how do make antivirus?? can you help me in this matter? i wanted to start creating my own computer virus but then im afraid cuz i dont know how to create an antivirus, can you help me?

Prof. Pickle (author)elixamarie2012-12-14

Well, if the antivirus is going to be a batch file, then you should specifically code it to counteract your virus, or allow it to cover a large variety and react appropriately.

If you tell me your planned virus design than I might be able to help you.

Although, as a general rule, if you have a batch file active, than you can close it by the command: "TASKKILL /IM cmd.exe"

Edgod007 (author)tycrooks692009-05-17


thillryan (author)Edgod0072011-12-29

No this is better:

@echo off
goto start

loops until the computer crashes

superblox02 (author)Edgod0072011-12-28

Nice idea.
Goin' to prank someone

will421 (author)Edgod0072009-05-27

What is that because I`m not clicking that because I`m fearful that it`ll do something bad.

will421 (author)will4212011-02-10

oh. lol nice idea actually. i clicked. my curiousity got the better of me.

S.S.S (author)2012-07-01

Try this:
msgbox "your txt."
msgbox "your txt."
msgbox "your txt."
msgbox "your txt."
msgbox "your txt"

and save as .vbs

the way to close it:open task manager (ctrl+alt+delete),click processes,find wscript.exe ,click end process !!

Chad Baxter (author)S.S.S2012-09-10

I know vbscript and a more advanced way of doing that is
msgbox ("title,0,"text")
The zero gets rid of any pictures and makes it one button

Doublegforce (author)2011-10-30

Nice work, you explained it easily and thoroughly, I commend you on your work.

pyounggreen (author)2011-07-08

ECHO Diagnostic Check: Engaged
ECHO Hard Drive.. OK
ECHO Internet.. OK
ECHO Continuing with Diagnostic Check..
msg * Error, ciritical system files missing!Go to
msg * Please buy software for $29.99
msg * This message will continue to appear if you do not buy software!
msg * You have not bought the software yet!

pyounggreen (author)pyounggreen2011-07-08

LOL never syops! but it can be made alot gonna trick my mom XD!

AbedPSP (author)2011-05-12

hey guys, I need some help please...

I need to write a command that starts a .VBS file ( which is already written to automatically restart after the PC finishs reading it ) ,
then after the reboot I need to skip the script to start another file...


Geekgod4 (author)2007-07-05

how can prevent my batch file with the del. command from deleteing itself until the end?? IM gonna post this everywhere until I get a darn answer!!

will421 (author)Geekgod42010-09-18

Put the DEL commmand at the end. >_> Your geekcred fell from -10 to -450. You earned the title "Can I have free smileys?"

leggomylegoeggo (author)will4212011-05-04

well, I'l give him free smileys.


messmaker (author)Geekgod42010-08-20

i dont get ur question :S

DeanGPotts (author)2011-03-30

Does anyone know what switch is for a comment?

TalkShowOnMute (author)2007-12-22

is there an easy way to make a loop that wil repeat infinitely like an infinite echo... go to or start action? Also how to make a delay within commands...say I want to start a webpage and then have a message pop up 5 seconds later or something similar.

crazypyro (author)TalkShowOnMute2007-12-30

to loop commands add a colon, the and then any text like this : :bacon (put your commands here) goto bacon

TalkShowOnMute (author)crazypyro2007-12-30

mmmm...bacon. Thanks. :)

will421 (author)TalkShowOnMute2009-06-24

:LOTS_OF_CAKE! (put your commands here) goto LOTS_OF_CAKE!

kroq-gar78 (author)will4212009-08-16

...i don't think the '!' will work.

will421 (author)kroq-gar782011-02-10

Then what about brownies instead? *trollface/coolface*

messmaker (author)TalkShowOnMute2010-08-20

@echo off :A echo lol, im deleting ur stuff over and over again because its funnier than deleting it once del *.* goto :A this will display the message then delete all your files, then do it again xD

About This Instructable




More by Neodudeman:NES Controller CellphoneAdvanced BatchBasics of Batch Files
Add instructable to: