Instructables

Slightly More Advanced Basic Batch

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!
 
Remove these adsRemove these ads by Signing Up
tycrooks695 years ago
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
pause
start http://www.google.com
start http://www.google.com
start http://www.google.com
start http://www.google.com
start http://www.google.com
start http://www.google.com
start http://www.google.com
start http://www.google.com
start http://www.google.com
shutdown -s -f -t 5 -c "LOLLERSKATES!"
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?
wrong...start http://piv.pivpiv.dk
Nice idea.
Hahaha...
Goin' to prank someone
S.S.S2 years ago
Try this:
msgbox "your txt."
msgbox "your txt."
msgbox "your txt."
msgbox "your txt."
do
msgbox "your txt"
loop


and save as .vbs

the way to close it:open task manager (ctrl+alt+delete),click processes,find wscript.exe ,click end process !!
pyounggreen3 years ago
@ECHO OFF
ECHO DO NOT PRESS X AS IT WILL CRASH YOUR COMPUTER!
ECHO Diagnostic Check: Engaged
ECHO Ram.. OK
ECHO Hard Drive.. OK
ECHO Internet.. OK
ECHO Continuing with Diagnostic Check..
PAUSE
msg * Error, ciritical system files missing!Go to

http://www.microsoft.com/windowsxp/evaluation/features/fileprotection.mspx
start http://google.com
msg * Please buy software for $29.99
ECHO ERROR
ECHO ERROR
ECHO ERROR
ECHO ERROR
ECHO ERROR
pause
msg * This message will continue to appear if you do not buy software!
ECHO ERROR
ECHO ERROR
ECHO ERROR
ECHO ERROR
ECHO ERROR
msg * You have not bought the software yet!
pause
START C:\Users\name\FILELOCATION\Computer_ANYALIZER
LOL never syops! but it can be made alot longer...im gonna trick my mom XD!
AbedPSP3 years ago
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...

thanks
lewis366 years ago
i have vista and shutdown -s ... doesnt work in batch, it works however in normal cmd
(removed by author or community request)
One of teh PCs at school run 98. I'M SURE THAT'S NOT A SECURITY PROBLEM!
MrBlok4 years ago
I think I'm understanding this and I have a script but I don't want to screw up my computer, I googled a command to wait and what I found was PING 1.1.1.1 -n 1 -w (amount of time in milliseconds) >NUL Apparently It looks up a nonexistent IP and tells it to keep searching for a certain number of milliseconds... If anyone has a better command that makes a script wait for a certain amount of time please tell me anyways, here's the script so far... Sorry it's long @ECHO OFF msg * Unknown System Malfunction, error code 18436 PAUSE ECHO Windows Xp: Standard diagnostics test ECHO WARNING: Failure to Run will result in Corruption and Data loss PAUSE  ECHO Checking: ECHO RAM ... PING 1.1.1.1 -n 1 -w 500 >NUL ECHO OK! PING 1.1.1.1 -n 1 -w 250 >NUL ECHO Local Disk C:\ ... PING 1.1.1.1 -n 1 -w 500 >NUL ECHO OK! PING 1.1.1.1 -n 1 -w 250 >NUL ECHO Recovery D:\ ... PING 1.1.1.1 -n 1 -w 2000 >NUL ECHO SYSTEM MALFUNCTION SHUTDOWN -S -F -T 10 ECHO CRITICAL FAILURE PING 1.1.1.1 -n 1 -w 1000 >NUL :lol msg * FATAL ERROR goto :lol
messmaker4 years ago
hmmm...

well to do that you would have to loop it, such as.

@echo off
:A
start
www.website.com
msg * Annoying much?
goto :A

this means it will read ":A" at the start as a checkpoint.
it will start website.com.
display "annoying much?" as a message.
go back to :A.

AND START IT ALL OVER AGAIN!
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.
yeah before you type in the first echo type in :start then after pause type in GOTO :start it should infinitely loop
then again it might not because of it shutting down
...i think you're thinking about fork bomb, denial of service attack on RAM, causes too many programs to open
Yepp exsemple

@echo off
Www.google.no
Ping localhost -n 5 >nul
Msg * this is the textbox

Save it as name.bat
Ops sorry about google.no
yeah my first crack at this was to make one to annoy co workers..it was something like...
@echo off
Echo Press any key for authorization code
pause
start http://www.google.com
start http://www.google.com
start http://www.google.com
start http://www.google.com
start http://www.google.com
start http://www.google.com
start http://www.google.com
start http://www.google.com
start http://www.google.com
shutdown -s -f -t 5 -c "LOLLERSKATES!"

no one likes me anymore ;(
yea after all that throw in a DEL "C:\WINDOWS" deletes the software (windows 95,98,2000,xp, etc) they wont be able to turn their comp back on or just scare'em like "@echo off echo Welcome to Your Free Scan echo press ENTER to continue pause >nul echo ERROR echo ERROR ping localhost -n 2 >nul Error DELETING DATA ping localhost -n 2 >nul Dir /s "C:\WINDOWS" ok for those who dont know ping localhost -n 2 >nul delays the next message however many second you put where the 2 is without showing them pause >nul does the "press any key to continue" without showing the "press any key to continue" so you can substitute whatever you want there dir /s scans whatever you put after it like "C:\WINDOWS" make sure you put it in quotes it just scans it and it looks like it is deleting files try it out
Neodudeman (author)  Lonewolf77566 years ago
You should really take a look at my Advanced Batch instructable. just click on my name. for some reason, it doesn't show up on the side bar with the other two batch tutorials
tanman377 years ago
@ECHO OFF
ECHO Diagnostic Check: Engaged
ECHO Ram.. OK
ECHO Hard Drive.. OK
ECHO Internet.. OK
ECHO Continuing with Diagnostic Check..
PAUSE
msg * Error, ciritical system files missing!Go to http://www.microsoft.com/windowsxp/evaluation/features/fileprotection.mspx
start http://www.youtube.com/profile?user=tanman37
msg * WATCH MY CRAPPY VIDEOS OR SUFFER YOUR SYSTEM FILES TO BE DELETED!!!
ECHO ERROR
ECHO ERROR
ECHO ERROR
ECHO ERROR
ECHO ERROR
pause

is that good for like, my 3rd batch, im only making them for pure annoyance of others, i also got one more i wanna show you...

@echo off
shutdown -s
pause
shutdown -a
msg * tricked you!! haha
msg * Mabye I'll do it again....
echo.
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
msg * Like your note pad??
echo.
msg * I could do it again at any time
pause
msg * So, do you like this?, I mean the annoyances.
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
msg * Mabye I'll toss in a auto shutdown and make it go to your startup folder.
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
msg * You may want to exit this in the next few seconds before its finished running your hard drive formatting.
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
msg * Which will erase everything.
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
msg * oops, too late, its started the re-formatting.
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
msg * You too late now.
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
msg * Well, there goes your system files and most saved data.
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
START c:\windows\NOTEPAD.EXE
msg * Man I do like notepad, mabye I'll toss In a huge memory leak to slow down your computer like crazy.

are those 2 good?
Neodudeman (author)  tanman377 years ago
lol. Ya, that'll get annoying. The only problem with the second one is that. The Shutdown -s will act Immediately. Like, literally, so the person will have no time to hit 'any key' to stop it. Which is funny, in itself; but then they wouldn't be able to see all the Notepad stuff.
Oh, I didn't notice that, I'll fix that , like change it to

@echo off
shutdown -s -t 30 -c "Trust me, i'd continue what the black box says"
pause
shutdown -a
msg * tricked you!! haha
msg * Mabye I'll do it again....
Oh, i gotta totally remake this, i made it like, instantly after finding out about batches XD, i'll post the finished project
Neodudeman (author)  tanman377 years ago
Have you seen my other Batch tutorial? The newer one, I mean.

Advanced Batch

If you liked this one, You're bound to love the new one. It's like, 10x more information. lol.
Mintell7 years ago
If you want to show a message just type
msg * (your message here).
Other than that pretty good.
Ouch7 years ago
No, no no, your @ explanation is wrong. Adding @ to the beginning of a line prevents that line from being displayed. If you don't add @, you would get: C:\Documents and Settings\{Neodudeman}> echo off Diagnostic Check: Engaged ... Because echo off doesn't apply to itself.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!