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 ...
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.