VBS - Self Writing Shutdown

24,699

10

13

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

Be the First to Share

    Recommendations

    • The 1000th Contest

      The 1000th Contest
    • Battery Powered Contest

      Battery Powered Contest
    • Hand Tools Only Challenge

      Hand Tools Only Challenge

    13 Discussions

    0
    DREWNOLT
    DREWNOLT

    Tip 5 months ago on Step 1

    Cool! I added it into a prank vbs file

    OIP (1).jpg
    0
    El Mano
    El Mano

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

    0
    iRule
    iRule

    Reply 11 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 .

    0
    El Mano
    El Mano

    Reply 11 years ago on Introduction

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

    0
    iRule
    iRule

    Reply 11 years ago on Introduction

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

    0
    NetDex
    NetDex

    11 years ago on Step 1

    It says Access Denied...

    0
    iRule
    iRule

    Reply 11 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.

    0
    El Mano
    El Mano

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

    0
    iRule
    iRule

    Reply 11 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

    0
    J-Manoo7
    J-Manoo7

    Reply 11 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!

    0
    iRule
    iRule

    Reply 11 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.

    0
    Lance Mt.
    Lance Mt.

    11 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

    0
    iRule
    iRule

    Reply 11 years ago on Introduction

    Lol sounds like fun ... im glad i helped