O'Reilly logo

Microsoft® Windows® Scripting Self-Paced Learning Guide by Ed Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Modifying an Existing Script

Now that your script is fully documented, you can modify it to pull in additional information. Thus far, you can retrieve the active computer name, the host name, and the computer name. (Actually, these names could be different in certain situations, so this script really is useful.) What kind of information could you be interested in retrieving at this juncture? Look at Table 1-1 for some ideas. (Notice in Table 1-1 that the registry keys are spelled out completely—HKEY_LOCAL_MACHINE, for instance—and the script you worked on earlier was abbreviated HKLM. VBScript allows you to reference the registry using several forms. These forms are covered in depth in the section on the registry.)

Table 1-1. Useful registry keys ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required