Microsoft® Windows® 2000 Scripting Guide
« Previous | Next »
You might want to monitor an entire subkey if you are interested in changes happening to a group of related registry entries. For instance, if you are troubleshooting an application that does not seem to save user customization data and you know the data should be stored in the registry, you can monitor the registry subkey of the program where the configuration settings are stored, in an effort to understand what is going wrong.
To monitor a subkey, subscribe to the RegistryKeyChangeEvent, specifying the subtree where the subkey you are interested in monitoring is located as well as the path of the subkey you want to monitor. Like the RegistryTreeChangeEvent, the RegistryKeyChangeEvent is fired when a modification is made to the subkey being monitored and the event does not provide any information beyond the fact that a modification has taken place.
The script in Listing 16.18 monitors and reports on events in the subkey. To carry out this task, the script must perform the following steps:
Listing 16.18 Monitoring Events at the Subkey Level
|
|
Send us your feedback | « Previous | Next » |