PC Tools - Essential tools for your PC
Search
 
 
Features
 
Newsletter
 

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 >

 
  Copyright © 1998-2008 PC Tools. All rights Reserved. Privacy Policy | Legal Notice