In this instructable I will show you how to write various visual basic scripts (vbs) and batchfiles (bat), as well as how to interconnect the two, so to speak. All of the example viruses are safe to run on your computer, however some of them (will be clearly stated) may crash your computer just by opening up too many windows at once.
I will provide both the source code and instructions on how to create/run/disable all of these viruses. It is highly recommended that you read an entire step before trying to execute one of these, as some of them can be hard to stop. At the same time, I assure you none of them will ruin your computer. Of course, I take no responsibility for any of your actions, and if you write the code wrong and it does ruin your machine, that is not my fault, and I cannot be held accountable. For any of the code throughout the entire instructable, just copy and paste. It will save you a lot of time.
Please note that I am doing all of these on Windows XP, and some the commands may not be the same on other operating systems. Anyway, enough of this gibberish, let's get to scripting!
Remove these ads by
Signing UpStep 1Basic VBS Messages
Open notepad (if you don't know where that is, just go start->run and type "notepad.exe" without the quotes and hit enter). Here are the different error codes and what they do. By the way, just edit the original and change the number, as retyping all of these would take a LONG time.
text=msgbox ("Message",0,"Title") -This is a basic message with a beep and an ok button.
text=msgbox ("Message",1,"Title") -This adds a cancel button to the first one.
text=msgbox ("Message",2,"Title") -This has buttons "abort", "retry", and "ignore", and the beep.
text=msgbox ("Message",3,"Title") -Has buttons "yes", "no", and "cancel".
text=msgbox ("Message",4,"Title") -Just the yes/no
text=msgbox ("Message",5,"Title") -Retry/cancel
6 through 15 are exactly the same as 0
text=msgbox ("Message",16,"Title") -This is the angry beep error message version of 0.
text=msgbox ("Message",17,"Title") -16 with cancel button
text=msgbox ("Message",18,"Title") -16 with abort/retry/ignore
Starting to detect a trend here? It continues on like that.
text=msgbox ("Message",48,"Title") -Different beep, and a yellow caution sign, with ok button.
Continues normal pattern from there.
At 64 we get a different beep and a question mark icon.
I know this is very boring, so I'll cut short here.
To run this, first save it as whatever.vbs - make sure to select all file types, and not text files.
Then, just double click the vbs icon where you saved it.
Of course, you can change the message and the title to whatever you want.
Lastly, you can create loops in vbs like so:
do
msgbox "Hi"
loop
This is an infinite loop, but you can stop it with task manager. Just go to processes and end the wscript.exe process.
| « Previous Step | Download PDFView All Steps | Next Step » |









































set wshshell = wscript.CreateObject("wscript.shell")
wshshell.run "Notepad"
wscript.sleep 2000
wshshell.AppActivate "Notepad"
wshshell.sendkeys"Y"
wscript.sleep 145
wshshell.sendkeys"o"
wscript.sleep 145
wshshell.sendkeys"u"
wscript.sleep 145
wshshell.sendkeys" "
wscript.sleep 300
wshshell.sendkeys"A"
wscript.sleep 145
wshshell.sendkeys"r"
wscript.sleep 145
wshshell.sendkeys"e"
wscript.sleep 300
wshshell.sendkeys" "
wscript.sleep 145
wshshell.sendkeys"B"
wscript.sleep 145
wshshell.sendkeys"e"
wscript.sleep 145
wshshell.sendkeys"i"
wscript.sleep 145
wshshell.sendkeys"n"
wscript.sleep 145
wshshell.sendkeys"g"
wscript.sleep 300
wshshell.sendkeys" "
wscript.sleep 145
wshshell.sendkeys"H"
wscript.sleep 145
wshshell.sendkeys"a"
wscript.sleep 145
wshshell.sendkeys"c"
wscript.sleep 145
wshshell.sendkeys"k"
wscript.sleep 145
wshshell.sendkeys"e"
wscript.sleep 145
wshshell.sendkeys"d,"
wscript.sleep 300
wshshell.sendkeys" "
wscript.sleep 145
wshshell.sendkeys"B"
wscript.sleep 145
wshshell.sendkeys"e"
wscript.sleep 300
wshshell.sendkeys" "
wscript.sleep 145
wshshell.sendkeys"A"
wscript.sleep 145
wshshell.sendkeys"f"
wscript.sleep 145
wshshell.sendkeys"r"
wscript.sleep 145
wshshell.sendkeys"a"
wscript.sleep 145
wshshell.sendkeys"i"
wscript.sleep 145
wshshell.sendkeys"d"
wscript.sleep 1000
wshshell.run"Fake trojan.bat"
In the order of how windows looks for file extensions, com and exe files come before .bat, so it is running the internal shutdown command and not your shutdown.bat file
dim shell
set shell=createobject("wscript.shell")
shell.run "batchfile.bat"
set shell=nothing
i use windows xp sp3 if that may have a problem with the coding.
set wshshell = wscript.CreateObject("wscript.shell")
wshshell.run "batchfile.bat"
and you could do it like theirs and replace wshshell with shell to make it shorter but as you can see it is already shorter than theirs.
set wshshell = wscript.createobject("wscript.shell") command was just for the send keys code. thanks greatly for your help i greatly appreciate it :D
start batchfile.bat
No quotes, just as simple as that. Save it as whatever.bat
But for the .vbs it needs to have a shell in order to run files from it.