Hello World!

Let’s get started by writing a basic script. As Windows scripts are simply text files, all you need to use a plain text editor like Windows Notepad to create them. Therefore open up a new Notepad window and type the following text:

WScript.Echo "Hello World!"

Script Example

Save the file into a directory as "script1.vbs", and double-click to execute it, you should get a popup message box saying "Hello World!" now click OK to close the box. Congratulations! That’s your first script, easy wasn’t it! We simply used the WScript.Echo method to display the words "Hello World!" to the user.

Note: The ".VBS" extension tells the scripting host that it’s dealing with a VBScript file, alternatively the ".JS" extension represents a JScript file.

Hint: The easy way to modify a script file is the right-click on the file icon then select 'Edit’.

Right-click Edit Example

< Overview

Interacting with Users >

PC Tools, the PC Tools logo and Spyware Doctor are either trademarks or registered trademarks of PC Tools Technology Pty Ltd. Microsoft, Windows, Windows Vista, the Windows logo and / or other Microsoft products referenced are either registered trademarks or trademarks of Microsoft Corporation in the United States and / or other countries.