Previous Page
Next Page

Exploring a Script: Step-by-Step Exercises

In this section, you will explore the four parts of a script written in VBScript language. This section also provides practice in using comments to add notes to an existing script.

1.
Open ExploringVBS.vbs in Notepad.exe. It is located in the My Documents\Microsoft Press\VBScriptSBS\ch01\StepByStep folder.

2.
Add comments that identify each section of the script. (Make sure to include all four parts of the script: header information, reference information, worker information, and output information.)

3.
Save the script with a different file name, such as YourNameExploringVBS.vbs.

4.
Delete the entire Header information section.

5.
Save the script and then try to run it. Does it run?

6.
Add the Option Explicit command again and save the file. Now does it run?

7.
Put a comment mark (') in front of Option Explicit and save the file. Does it run?


Previous Page
Next Page