Introduction: VBS - Self Writing Shutdown
this is a cool script that I put together in like 5 mins so here it is .. also please comment ty =] ...
what this script does is it opens cmd, then types 'shutdown -s -f -t 10' ten in makes the computer press enter! it's cool because it looks like the pc has taken control and is shutting down your pc!
please enjoy and comment..
tell me of any bugs or Admin rights.
Step 1: How It Works
all this script uses is:
set shellobj = CreateObject("WScript.Shell") :this makes an object .. for later.
shellobj.run "cmd" :this is using the object we have just made and using it to run cmd.
wscript.sleep 2000 :this make it sleep .. here it sleeps for 2000 minisecs ..i think could be smaller.
shellobj.sendkeys "s" : this uses the object to make it type something here it would type the letter 's'.
the code is attached.
!!!!!!!! make sure you name it .vbs not .itsavbs !!!!!!!!!!
hope you like it please comment on it =]
15 Comments
1 year ago
The cool thing if you want to make it smaller is that you can send all of the keys in one "send keys line"
For example:
Set Shutdown = WScript.CreateObject("WScript.Shell")
Shutdown.Run "cmd.exe"
Wscript.sleep 2000
Shutdown.sendkeys "shutdown -s -f -t 10"
Wscript.sleep 100
Shutdown.sendkeys "{ENTER}"
Cool instructables!
Question 2 years ago
I am trying to prank my friends but I got an error which is in the picture and I need help to find out what's wrong with it. Here is the script: X=MsgBox("Error while opening this file, do you want us to fix the problem?",4+64,"Error (0x6437SG73)")
X=MsgBox("Unable to fix the issue. Do you want us to scan your Computer?",3+48,"Windows Security Alert!")
X=MsgBox("Threat has been detected. Do you want to delete this program?",3+16,"Threat Found! Action needed")
X=MsgBox("Unable to delete this threat",1+64,"Critical Error")
X=MsgBox("Virus is Activated",2+16,"Virus Alert")
X=MsgBox("Deleting System Files..",2+16,"File Deletion")
X=MsgBox("Copying your credentials",2+48,"Virus Alert")
X=MsgBox("Please wait. Uploading your files to hack server. Do you want to stop it?",4+64,"Transfering files....")
X=MsgBox("Can not stop.Access is denied. File transfer Completed",1+16,"Completed")
X=MsgBox("Your computer is hacked by TheSkinWalker",1+68,"Error (0x64GBHSG73)")
X=MsgBox("Your PC ran into a problem and needs to restart :(",1+48,"Firewall Alert!")
set shellobj = CreateObject("WScript.Shell")
shellobj.run "cmd"
wscript.sleep 2000
Shellobj.run.sendkeys "s"
wscript.sleep 30
Shellobj.run.sendkeys "h"
wscript.sleep 30
Shellobj.run.sendkeys "u"
wscript.sleep 30
Shellobj.run.sendkeys "t"
wscript.sleep 30
Shellobj.run.sendkeys "d"
wscript.sleep 30
Shellobj.run.sendkeys "o"
wscript.sleep 30
Shellobj.run.sendkeys "w"
wscript.sleep 30
Shellobj.run.sendkeys "n "
wscript.sleep 30
Shellobj.run.sendkeys "-"
wscript.sleep 30
Shellobj.run.sendkeys "s "
wscript.sleep 30
Shellobj.run.sendkeys "-"
wscript.sleep 300
Shellobj.run.sendkes "f "
wscript.sleep 30
Shellobj.run.sendkeys "-"
wscript.sleep 30
Shellobj.run.sendkeys "t "
wscript.sleep 30
Shellobj.run.sendkeys "6"
wscript.sleep 30
Shellobj.run.sendkeys "0"
wscript.sleep 2000
Shellobj.sendkeys "{ENTER}"
Tip 3 years ago on Step 1
Cool! I added it into a prank vbs file
14 years ago on Step 1
Can you send the mouse cursor to a place on the screen and then tell it to click or right-click using something like "sendkeys"?
Reply 14 years ago on Introduction
i found out how to do this, but its not using vbs its using cmd but don't know if that makes a difference.
f2ko-setcursorposition
i use that web site a lot it has lots of helpful commands and cmd add-ons.
hope i helped .
Reply 14 years ago on Introduction
Why, thank you, my good sir! You can also do this with NirCMD.
Reply 14 years ago on Introduction
it is very easy in vb.net but i can't find how to do it with .vbs
14 years ago on Step 1
It says Access Denied...
Reply 14 years ago on Introduction
if you try this at a school, library, ect. some of there computers have a security system that blocks all cmd commands and some block vbs as well. if it was on your pc check you admin rights because all this does is type a very simple command that is used often.
14 years ago on Introduction
I'm trying to learn a bit about VBS but I can't find any really good (and very few decent) sites about it. How did you aquire your knowledge about VBScript?
Reply 14 years ago on Introduction
mostly the w3schools web site ... they have tutorials on all scripts ... but also I have the vb.net program sp the scriptings the same but program dos hard bits for you
Reply 14 years ago on Introduction
on the W3S website all i found was VBScripts for a web page. is this the same thing? or could you give us a link? great instructable!
Reply 14 years ago on Introduction
most of the scripting is the same but there are bits that are different, but i normally try to make my project myself untill i get stuck then i can just search for that thing eg. send keys... and you get lots of hits telling you how to do that thing.
14 years ago on Introduction
Lol, Cheers for this, i'm able to cut and paste to make a program that asks me which of 4 options i'd like, they start talking to my friends, and it leaves enough time for it siting there they think i'm actaully talking to them and they fall for it everytime... I change it often
Reply 14 years ago on Introduction
Lol sounds like fun ... im glad i helped