VBS - Self Writing Shutdown





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 =]



    • Creative Misuse Contest

      Creative Misuse Contest
    • Clocks Contest

      Clocks Contest
    • Water Contest

      Water Contest

    12 Discussions

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

    3 replies

    i found out how to do this, but its not using vbs its using cmd but don't know if that makes a difference.


    i use that web site a lot it has lots of helpful commands and cmd add-ons.
    hope i helped .

    Why, thank you, my good sir! You can also do this with NirCMD.

    it is very easy in vb.net but i can't find how to do it with .vbs

    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.

    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?

    3 replies

    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

    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!

    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.

    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

    1 reply