Skip to Content
Microsoft® Windows® Scripting Self-Paced Learning Guide
book

Microsoft® Windows® Scripting Self-Paced Learning Guide

by Ed Wilson
April 2004
Beginner
416 pages
11h 3m
English
Microsoft Press
Content preview from Microsoft® Windows® Scripting Self-Paced Learning Guide

Quiz Yourself

Q.

What is the reason for including Option Explicit as the first line of a VBScript?

A.

Option Explicit forces you to list each variable you are going to use in your script. It is useful in that it guards against misspelled words and helps you to know which parts of the script are real commands and which parts are made-up variable names. When you do not use Option Explicit, a misspelled variable automatically becomes a new variable.

Q.

You are trying to read from the registry; however, every time the script gets to a particular key, the script fails. What can be done to prevent this?

A.

You can use two approaches to prevent the script from failing when an error is present. The first is to include On Error Resume Next in your script. The ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft® Windows® 2000 Scripting Guide

Microsoft® Windows® 2000 Scripting Guide

Microsoft Corporation
Professional C# 5.0 and .NET 4.5.1

Professional C# 5.0 and .NET 4.5.1

Christian Nagel, Jay Glynn, Morgan Skinner

Publisher Resources

ISBN: 9780735619814Supplemental ContentCatalog PageErrata