DO NOT TRY THIS AT HOME : Our text files and message bases are for INFORMATIONAL PURPOSES ONLY. DO NOT undertake any project based upon any information obtained from this or any other web site.We are not responsible for, nor do we assume any liability for, damages resulting from the use of any information on this site.
(165 votes) Published: Feb 21, 2006 1:17 p.m. In 38 Favorites Lists Viewed 3741 times
Batch Files
After seeing all these homemade batch files on RE, and how successful they were, I started to tak intrest in batch files. And surprisingly, they never taught how to make batch 5cripts, only the 5cript itself. I looked at a few of these eggs and I picked up how to do them pretty quickly. Not only will this egg encompass how to make a batch file, it will also give you an example which you can use on others.
Commands
To create a batch file, you will need notepad.
All you need to do is open up a new notepad document and start typing away. Once you are done you need to go to Save As and selct All Files for save as type. Then just add a .bat extension at the end of the file name and it’s done. To run it just go to the location you saved it to and select open. That’s it!
I’ll only be teaching you the basic commands today, as I am still a noob at batch files. I’ll teach you all the basics.
@echo off - makes the code you type in to make something happen not appear when running the file
title " " - Decides the title of batch file when opened (insert title into underlined space, and take away quotation marks)
echo msgbox" " >C:\1.vbs
C:\1.vbs
cls
This makes a pop-up message appear^(insert title into blank space, and keep quotation marks)
pause - makes "Press any key to continue"
@echo " " - creates a line of text (insert desired text in to blank space, and take away quotation marks)
Stuff about Shutdown
shutdown and then the following (they must have the negative thing on them) makes these things happen.
-i - Display GUI interface, must be the first option
-l - Log off (cannot be used with -m option)
-s - plain, old shutdown
-r - restart
-a - abort shutdown
-m \\computername - remote computer shutdown, reboot, or abort
-t xx - set countdown(insert # of seconds into xx)
-c " " - add a message to shutdown window (insert message into blank space, keep quotation marks)
-f - shutdown all applications without warning
-d [u] [p]:xx:yy - This is the reason code. us is user, p is shutdown code, xx is the more important reason code (+ integer no greater than than 256), and yy is the least important reason code( + integer less than 65536)
Example
shutdown -f -c -s "Forcing all apps. to close because of shutdown."
This is a shutdown with a comment, forcing all apps. to close without warning.
That’s about all I know, as I just started playing around with batch files 2 days ago.
My Batch File
Now here’s one of my existing batch files.
@echo off
title Hello...
echo msgbox"How is your day going?" >C:\1.vbs
C:\1.vbs
cls
pause
echo msgbox"Well, it is about to get a lot worse..." >C:\1.vbs
C:\1.vbs
cls
@echo You computer has been hacked.
pause
@echo The inevitable has happened.
pause
@echo I will install a virus on your computer.
pause
@echo A message will pop-up shortly.
pause
echo msgbox"Virus Detected! Attepting to delete virus." >C:\1.vbs
C:\1.vbs
cls
@echo There is only one way to stop me.
pause
echo msgbox"Enter the password to stop the virus." >C:\1.vbs
C:\1.vbs
cls
@set/p\/name=Password:
echo msgbox"Wrong answer...you have one more chance" >C:\1.vbs
C:\1.vbs
cls
@set/p\/name=Password:
echo msgbox"Nope...that’s not it." >C:\1.vbs
C:\1.vbs
cls
@echo All files are being corrupted by the virus now.
pause
@echo You will need to re-install your current OS the next time you boot.
pause
@echo Didn’t I tell you your day was about to get a lot worse?
pause
shutdown -s -t 15 -c "The system is performing a mandatory shutdown because of corrupted system files."
(Click to enlarge)
The End
Batch files can be a lot of fun once you get better. Use them to prank people, impress your friends, whatever you want.
-0wnd1zzl3d
PS. I’m sorry about the quality of the first 3 pics. Imageshack wouldn’t take them because they were a little too large, even at 640x480, so I had to resize them to 240x320. It wouldn’t take them then either, so I had to optimize them on Imageshack, too.
PPS. And guys, I like to see your comments, please post them. Tell me how I can improve and what I’m doing wrong. And if you’re going to rate me down, give me reasons, not just "this is gay 0*". Thanks!
Feb 21, 2006 1:38 pm - Yeah, it’s like a joke virus (at least waht I made). Batch files are pretty much a series of commands that are executed. You can make a batchfile start upa any program you wish with other codes. One way to get someone to open it is to just say it’s a cool file or something from an anonamyous e-mail. Or you can send it from your school administrator to all the teachers and say "It’s a routine virus scan" (thanks to Slash for that idea). Stuff like that.
Feb 21, 2006 1:41 pm - Unless you make a command that will. Like initiating a virus. However, this batchfile will only display text and then shut down your computer.
how can u send a batch file through msn or aim or yahoo cause i cant cause in msn it says its potentially unsafe and it wont let it go through and i asked one of my friends and he said i would have to bind it with like a jpg or somethin but i dunno how to do that so if u have any answers pm me
Feb 21, 2006 2:04 pm - help i gotta admit im a batch noob. i saved them in the notepad and save it as a .bat file but when i click on it the command box just pops up and dissapears almost instantly. is it because im usin xp or sumthin else. plz help
Feb 21, 2006 6:39 pm - Save it as .bat and to send it on AIM go to the location you put it at and right click. Then select send to and selct compressed folder.
Feb 21, 2006 7:38 pm - I dont know if you want to or can use any of this in your batch file, but here are some tips.
If you want to Get rid of the previous text and start over put this -
"@echo blah blah blah
start /w w5cript.exe C:\sleep.vbs
cls "
This would erase the previous text from the Batch file screen and start putting in the next @echo you want.
Another thing you might want to do iz, For example if you wanted it to say Deleting... (with the periods flashing 1,2,3) do this-
"@echo Deleting.
start /w w5cript.exe C:\sleep7.vbs
cls
@echo Deleting..
start /w w5cript.exe C:\sleep7.vbs
cls
@echo Deleting...
start /w w5cript.exe C:\sleep7.vbs
cls
@echo Deleting.
start /w w5cript.exe C:\sleep7.vbs
cls
@echo Deleting..
start /w w5cript.exe C:\sleep7.vbs
cls
@echo Deleting...
start /w w5cript.exe C:\sleep7.vbs
cls"
Feb 21, 2006 7:44 pm - Okay, this is the updated version
@echo off
title Hello...
echo msgbox"How is your day going?" >C:\1.vbs
C:\1.vbs
cls
pau e
echo msgbox"Well, it is about to get a lot worse..." >C:\1.vbs
C:\1.vbs
cls
@ec o Your computer has been hacked.
start /w w5cript.exe C:\sleep.vbs
cls
@echo The inevitable has happened.
start /w w5cript.exe C:\sleep.vbs
cls
@echo I will install a virus on your computer.
start /w w5cript.exe C:\sleep.vbs
cls
@echo A message will pop-up shortly.
pause
echo msgbox"Virus Detected! Attepting to delete virus." >C:\1.vbs
C:\1.vbs
cls
@ec o There is only one way to stop me.
pause
echo msgbox"Enter the password to stop the virus." >C:\1.vbs
C:\1.vbs
cls
@se /p\/name=Password:
echo msgbox"Wrong answer...you have one more chance" >C:\1.vbs
C:\1.vbs
cls
@se /p\/name=Password:
echo msgbox"Nope...that&r quo;s not it." >C:\1.vbs
C:\1.vbs
cls
@ec o All files are being corrupted by the virus now.
pause
@echo You will need to re-install your current OS the next time you boot.
pause
@echo Didn’t I tell you your day was about to get a lot worse?
pause
shutdown -s -t 15 -c "The system is performing a mandatory shutdown because of corrupted system files."
Feb 21, 2006 8:29 pm - Nice batch, i just did the updated version, for some reason at the end where it says "@echo Didn’t I tell you your day was about to get a lot worse?
pause " the apostrophe got fuked up. Maybe i was just seeing things, maybe its just my computer. did it happen to you, or anyone else?
Its not a big deal, just it was strange,kinda looked like Œ or Æ one of these types of symbols.i doubt anyone who opens this batch file unexpectedly would care because there comp shuts down in 15 seconds anyways lol.
Feb 21, 2006 8:32 pm - This is my batch file i keep improving in case your wondering, I liked your idea about the Shutdown thing at the end, i didnt know you could do that. I got some info from a bunch of people on this site so parts of it were copy and pasted, im not trying to get a good rep on this site lol, just to scare people at home, thats why a lot of it was C/P.
@echo off
title Jorglvirus
echo W5cript.Sleep 3000>C:\sleep.vbs
start /w w5cript.exe C:\sleep.vbs
cls
@echo As you watch...
start /w w5cript.exe C:\sleep.vbs
cls
@echo Your computer is being terminated.
start /w w5cript.exe C:\sleep.vbs
cls
@echo There is nothing you can do.
start /w w5cript.exe C:\sleep.vbs
cls
cls
@echo This is why we make backups...
start /w w5cript.exe C:\sleep.vbs
cls
start /w w5cript.exe C:\sleep.vbs
cls
@echo i see you have virus control...
echo msgbox"Virus ’Jorglvirus’ detected. Attempting to delete." >C:\1.vbs
C:\1.vbs
cls
sta t /w w5cript.exe C:\sleep.vbs
@echo that didnt work...
start /w w5cript.exe C:\sleep.vbs
start /w w5cript.exe C:\sleep.vbs
echo msgbox"Network Compromised. 564 clients detected." >C:\2.vbs
C:\2.vbs
cls
@echo Poor You...
echo msgbox"Jorglvirus sent to server. " >C:\3.vbs
C:\3.vbs
start /w w5cript.exe C:\sleep.vbs
cls
@echo Necessary WINDOWS components deleted.
Start /w w5cript.exe C:\sleep2.vbs
cls
echo msgbox"You will need to re-install Windows OS at next boot." >C:\4.vbs
C:\4.vbs
@echo Termination of all C:/ Files is Commencing....
start /w w5cript.exe C:\sleep.vbs
cls
@echo Looking for critical components.
start /w w5cript.exe C:\sleep7.vbs
cls
echo msgbox"Folder and Folder Components Deleted" >C:\f.vbs
C:\f.vbs
@echo All C:/ Files have been terminated
start /w w5cript.exe C:\sleep.vbs
cls
echo msgbox"Press OK to continue" >C:\e.vbs
C:\e.vbs
start /w w5cript.exe C:\sleep7.vbs
cls
@Echo System Reboot...
pause
shutdown -s -t 15 -c "The system is performing a mandatory shutdown because of corrupted system files."
exit
exit
exit
exit
exit
@echo this is a batch file my first one to this rocks i got it of er.com aka
rotteneggs.com ha ha ha
pause
pause
pause
ech msgbox"this is your computer">C:\1.vbs
C:\1.vbs
pause
-i
-t 60
@echo msgbox"your computer will shut down in t-minus 60
seconds">C:\1.vbs
C:\1.vbs
Feb 22, 2006 4:20 pm - u motherfucking GOD!!! nice egg and you definetly get 5*! Everyone quit being dicks and vote this jesus a 5. Thank you very much and when i figure out how to create new ones ill enter them. thnx man!!!!!!!
Feb 22, 2006 5:11 pm - hey camthedew! i tried to put it in a zipped folder, but when i sent it my friend said it falied. It started, but it failed. Someone help!
Feb 27, 2006 6:02 pm - There should be a whole category on the site just about batch files. What’s up with them? They get so boring! Try some vB or c++ you can do so much more..
Apr 15, 2006 7:16 am - Hey guys I have some questions for you.
I’m a noob at batchfiles sow could you tell me how you get a autorun in a batch file?
And how to startup a program with a batch file.
My last question what does this (start /w w5cript.exe C:\sleep.vbs
cls)
do?
Please answer my questions btw 5*
Apr 15, 2006 7:16 am - Hey guys I have some questions for you.
I’m a noob at batchfiles sow could you tell me how you get a autorun in a batch file?
And how to startup a program with a batch file.
My last question what does this (start /w w5cript.exe C:\sleep.vbs
cls)
do?
Please answer my questions btw 5*
May 18, 2006 4:44 pm - That is friggin awesome! There aren’t very many eggs on programming.( like some other subjects that have hundreds of eggs that all say the samething *coughcoughNAPALMcoughcou h*)
Oct 26, 2006 11:12 am - 5 stars great but im not sure if people understand that they can just delete everything on somones computer and then close it down in a count down form i know u should the count down and stuff i dont no if people will understand that they can also do this wat i said hey people that see this comment say if you understood that instead of writing that you can just write 2 lines in notepad and then save as a .bat and send it to somone and there computer will delete everything in there c:drive and then shutdown after 11 seconds thanks