Enumerating Keys, Subkeys, and Entries

Microsoft® Windows® 2000 Scripting Guide

microsoft windows 2000 scripting guide

« Previous | Next »   

Enumeration is the process of listing the contents of a container. Just as you might open a folder and inspect its subfolders and files, you might want to inspect the child subkeys within a subkey or the entries within a subkey. For example, the script in Listing 16.1 retrieves the location of the registry hive files by listing all of the entries in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\hivelist subkey. The only way to determine all the registry hive files is to enumerate each entry within this subkey.

Enumeration is also used when troubleshooting configuration problems with the operating system or with an application. When a particularly stubborn problem occurs with an application, support personnel might ask you to provide a list of all the registry subkeys, entries, and values for that application. Retrieving these items programmatically is obviously much faster and easier than retrieving them using the GUI, especially if the same information must be obtained from multiple computers.


send us your feedback Send us your feedback « Previous | Next »   


Microsoft Windows 2000 Scripting Guide(c) Automating System Administration 2003
Microsoft Windows 2000 Scripting Guide(c) Automating System Administration 2003
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 635

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net