Monday, September 27, 2010

Easy Harmless Funny Virus with VBScript

Posted by Patel Gopal On 1:03 AM 0 comments

Steps:

1.  
Click on the "Start" button, on the Windows taskbar.

2.  
Click on "Run" and place your cursor in the text box.

3.  
Type in "notepad" and press "Enter" or click on "Ok".

4.  
Enter VBScript code from examples below, making sure each command is on its own line of a text document.

5.  
Save your creations when done.

Click on "File" from the menu bar.
Select "Save".
Choose a name, and be sure to change its extension from ".txt" to ".vbs".

6.  
Run your saved file by browsing to it, then double-clicking on it.


Hello World Example:


1.  
Enter   msgbox("Hello world")   inside of the blank Notepad document. This command creates a dialog box with the words "Hello world".

2.  
Enter   inputbox("What is your name?")   on a new line of this document. This command creates a dialog box that has a text box for inputing text.


Create a Folder Example
:



1.  
Enter the following into a new Notepad document:

Option Explicit
Dim objFS, objFolder
Dim strDir
strDir = "c:\VBS_Test"
Set objFS = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFS.CreateFolder(strDir)
WScript.Echo "I created the folder " & strDir & " using wikiHow's example!"
WScript.Quit

0 comments:

Post a Comment