Registering the Registry Provider

[This is preliminary documentation and subject to change.]

Because the Registry Provider is not automatically registered with CIMOM as part of the WBEM installation process, applications wanting to use it must complete the registration. An application registers the Registry Provider by creating a MOF file with instances of registration classes and either compiling it as a stand-alone file or including it at the top of an application-specific MOF file. The application-specific MOF file contains the classes and instances used to access the registry data.

The newly-created MOF file contains an instance of the __Win32Provider class and one of the following instances, depending on whether the application intends to use the Registry Provider as an instance, property, or event provider:

The __Win32Provider instance describes the name of the provider and its class identifier (CLSID). The following instances are used to register the Registry Provider as an instance provider or a property provider:

// Instance provider
instance of __Win32Provider as $P
{
    Name    = "RegProv" ;
    ClsId   = "{fe9af5c0-d3b6-11ce-a5b6-00aa00680c3f}" ;
};    

//Property provider
instance of __Win32Provider as $P
{
    Name = "RegPropProv";
    Clsid = "{72967901-68EC-11d0-B729-00AA0062CBB7}";
};

The __InstanceProviderRegistration and __PropertyProviderRegistration instances describe the operations that the provider supports:

//Instance provider
instance of __InstanceProviderRegistration
{
    Provider = $P;
    SupportsPut = TRUE;
    SupportsGet = TRUE;
    SupportsDelete = FALSE;
    SupportsEnumeration = TRUE;
};

// Property provider
instance of __PropertyProviderRegistration 
{
    Provider = $P;
    SupportsGet = TRUE;
    SupportsPut = TRUE;
};

For information on registering the Registry Provider as an event provider, see Registering for Registry Events.