Next

Header information

The Header information section of ListShares.vbs contains all the standard information. You use Option Explicit to force the declaration of all variables. This is followed by On Error Resume Next to make sure the script goes to the next line of code if it encounters an error.

Note

Note

In Chapter 1, we talked about the pros and cons of using On Error Resume Next. Most of the time, when you are working with WMI, you are displaying property values, which is a harmless activity. Using On Error Resume Next helps the script to run, even when the script encounters an error. This is largely a good thing with WMI.

These two standard lines ...

Get Microsoft® Windows® Scripting Self-Paced Learning Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.