Windows Management Instrumentation SDK Sample


Registry

This sample illustrates how to retrieve registry data from WMI.  Note that the accompanying MOF (registry.mof) must be compiled and loaded for this sample to run correctly.  The MOF file contains class definitions of the Registry keys to be read by the sample.

 

Compiling the Registry MOF

 

The Registry MOF can be compiled by doing the following:

 

1.      At the command prompt, change directory to the installation drive and directory of the Registry sample (e.g., D:\>Program Files\WMI\samples\Scripting\WSH\VBScript\Registry):

 

CD “\Program Files\WMI\samples\Scripting\WSH\VBScript\Registry”

 

2.      Once in the installation directory, compile the Registry MOF using the WMI MOF compiler, MOFCOMP:

 

MOFCOMP registry.mof

 

Once the MOF is compiled, the Registry script may be run and the results of the Registry query will be displayed.

 

© 1998-1999 Microsoft Corporation. All rights reserved.