I have added WMI support for the driver and I can access the class and
the properties using wbemtest and other utlilities.

However, there is something that the DDK mentions about having a
Property Page and I am not able to see where the propety page comes or
how to enable the property page ?

I have browed theough the device manager, services menu et al but I
cant find it.
this is what the DDK says...

"Drivers can automatically expose any WMI classes they implement on
their property sheet by using the WMI generic property page provider."

I have enabled everything through the INF that the DDK says about the
property page provider and the co-installer as below, but I still can't
find the damn property page..neither in the device manger( by right
clicking the device or elsewhere). Any help is appreciated.

Thanks.

This is from the DDK and I am doing everything as below.

Enabling the Generic Property Page Provider
To use the WMI generic property page provider with your driver, you
must enable wmiprop.dll as a device co-installer.

In the CoInstaller add-registry-section, register wmiprop.dll as a
co-installer for the WMI class by adding a value entry for the class
GUID under the HKLM\System\CurrentControlSet\Control\CoDeviceInstallers
key. The value for the value entry is "WmiProp.dll,
WmiPropCoInstaller". For example:

; This section is defined in the CoInstaller section, as follows.
; [CoInstaller]
; AddReg = CoInstaller_AddReg

[CoInstaller_AddReg]
HKLM, System\CurrentControlSet\Control\CoDeviceInstallers, ClassGUID,
0x00010000, "WmiProp.dll, WmiPropCoInstaller"

ClassGUID is the GUID for the WMI class. See Registering a Class
Co-installer for details.

You must also specify the particular WMI classes to be exposed through
the generic property provider. To do this, set the WmiConfigClasses
value-entry to be a comma-separated list of the WMI classes in the
add-registry-section of the device class or device hardware instance.

; the device class AddReg section.
[device_class_AddReg]
HKR,,"WmiConfigClasses",0x00000000,"class1,class2"

; the device hardware instance AddReg section.
[device_hw_inst_AddReg]
HKR,,"WmiConfigClasses",0x00000000,"class3"

Re: WMI Property Page for Driver by Gennady

Gennady
Tue May 16 01:47:15 CDT 2006

We managed to add WMI property page adding the following to our
driver's *.inf file:

---
...
;
; Additional registry entries for the parameters
;
[XXX_Service_Instx86.AddReg]
;
; Add WMI property page support
;
HKLM ,"SYSTEM\CurrentControlSet\Control\Class\{_DRIVER_CLASS_GUID_}", \
"WmiConfigClasses",0x00000000,"_WMI_CLASS_NAME_FROM_MOF_FILE_"

...

[CoInstaller_AddReg]
;
;Add class co-installer (WMI property page provider)
;
HKLM,System\CurrentControlSet\Control\CoDeviceInstallers,\
{_DRIVER_CLASS_GUID_},0x00010000, "WmiProp.dll, WmiPropCoInstaller"
...
---
You should change _DRIVER_CLASS_GUID_ to the GUID of your driver's
class and _WMI_CLASS_NAME_FROM_MOF_FILE_ to the name of your WMI class
from the MOF file.

Regards,
Gennady Mayko.


Re: WMI Property Page for Driver by amparikh

amparikh
Tue May 16 12:33:41 CDT 2006


Gennady Mayko wrote:
> We managed to add WMI property page adding the following to our
> driver's *.inf file:
>
> ---
> ...
> ;
> ; Additional registry entries for the parameters
> ;
> [XXX_Service_Instx86.AddReg]
> ;
> ; Add WMI property page support
> ;
> HKLM ,"SYSTEM\CurrentControlSet\Control\Class\{_DRIVER_CLASS_GUID_}", \
> "WmiConfigClasses",0x00000000,"_WMI_CLASS_NAME_FROM_MOF_FILE_"
>
> ...
>
> [CoInstaller_AddReg]
> ;
> ;Add class co-installer (WMI property page provider)
> ;
> HKLM,System\CurrentControlSet\Control\CoDeviceInstallers,\
> {_DRIVER_CLASS_GUID_},0x00010000, "WmiProp.dll, WmiPropCoInstaller"
> ...
> ---
> You should change _DRIVER_CLASS_GUID_ to the GUID of your driver's
> class and _WMI_CLASS_NAME_FROM_MOF_FILE_ to the name of your WMI class
> from the MOF file.
>
> Regards,
> Gennady Mayko.

I have added the lines to the INF and then installed the driver and I
am still not seeing any property page.
where exactly do we find the property page ? via device amnager or
somewhere lese ?

Thanks.


Re: WMI Property Page for Driver by Gennady

Gennady
Wed May 17 01:32:33 CDT 2006

We use device manager to show the WMI page in the properties dialog of
the device. We work with Windows XP, SP 2.

Please check if information from *.inf file is really appear in the
registry in correct place after you install the driver (during
debugging we sometimes enter those strings into the registry manually).

You can enable setup api log and see if the WmiProp.dll is loaded and
called when you ask device manager to show the property page of the
driver.

Also at this moment Windows sent some WMI requests so you can trace
them in the driver.

Regards,
Gennady Mayko.


Re: WMI Property Page for Driver by amparikh

amparikh
Wed May 17 01:36:11 CDT 2006


Gennady Mayko wrote:
> We use device manager to show the WMI page in the properties dialog of
> the device. We work with Windows XP, SP 2.

Oh, I am running it on Vista though. Could that be a difference ? I
dont think so.

>
> Please check if information from *.inf file is really appear in the
> registry in correct place after you install the driver (during
> debugging we sometimes enter those strings into the registry manually).

>>Yes the registry is updated with the stuff added in INF.

>
> You can enable setup api log and see if the WmiProp.dll is loaded and
> called when you ask device manager to show the property page of the
> driver.
yes the wmiprop.dll seems to have been loaded, though it is hard to say
if it is directly related to my driver because there are others drivers
on the system that have enabled WMI and have wmiprop coinstaller.

>
> Also at this moment Windows sent some WMI requests so you can trace
> them in the driver.
>
Yes, I get all the right calls into the drriver for querring WMI.

Yet, the property page is nowehere to be seen,.

> Regards,
> Gennady Mayko.


Re: WMI Property Page for Driver by Gennady

Gennady
Wed May 17 01:45:01 CDT 2006

> > You can enable setup api log and see if the WmiProp.dll is loaded and
> > called when you ask device manager to show the property page of the
> > driver.

> yes the wmiprop.dll seems to have been loaded, though it is hard to say
> if it is directly related to my driver because there are others drivers
> on the system that have enabled WMI and have wmiprop coinstaller.
--
You can delete setupapi.log after you open the device manager and
before you ask it to show the poperty page. Then, after opening and
close driver's properties dialog, you will see only the messages
related to this action and can verify if WmiProp.dll is loaded.

Regards,
Gennady Mayko.


Re: WMI Property Page for Driver by amparikh

amparikh
Wed May 17 01:49:16 CDT 2006


Gennady Mayko wrote:
> > > You can enable setup api log and see if the WmiProp.dll is loaded and
> > > called when you ask device manager to show the property page of the
> > > driver.
>
> > yes the wmiprop.dll seems to have been loaded, though it is hard to say
> > if it is directly related to my driver because there are others drivers
> > on the system that have enabled WMI and have wmiprop coinstaller.
> --
> You can delete setupapi.log after you open the device manager and
> before you ask it to show the poperty page. Then, after opening and
> close driver's properties dialog, you will see only the messages
> related to this action and can verify if WmiProp.dll is loaded.
>
> Regards,
> Gennady Mayko.

Ok thanks. I just verified and no messages seemed to be coming out in
setupapi related to wmiprop.

so what could be the issue ?
Some of this stuff needs to be documented better if it changes or
behaves differently.

are you sure there is nothing else required in the INF ?


Re: WMI Property Page for Driver by Gennady

Gennady
Wed May 17 02:44:11 CDT 2006

> Ok thanks. I just verified and no messages seemed to be coming out in
> setupapi related to wmiprop.
>
> so what could be the issue ?
--
Probably WmiProp.dll is not registered as class co-installer for the
class of your devices.
Please check if in the
HKLM\SYSTEM\CurrentControlSet\Control\CoDeviceInstallers
branch you have a value name with the GUID of your class with
REG_MULTI_SZ string "WmiProp.dll, WmiPropCoInstaller".


> Some of this stuff needs to be documented better if it changes or
> behaves differently.
>
> are you sure there is nothing else required in the INF ?
--
Acording to our *.inf file there is nothing else related to WMI in it.

Regards,
Gennady Mayko.


Re: WMI Property Page for Driver by amparikh

amparikh
Wed May 17 18:12:01 CDT 2006


Gennady Mayko wrote:
> > Ok thanks. I just verified and no messages seemed to be coming out in
> > setupapi related to wmiprop.
> >
> > so what could be the issue ?
> --
> Probably WmiProp.dll is not registered as class co-installer for the
> class of your devices.
> Please check if in the
> HKLM\SYSTEM\CurrentControlSet\Control\CoDeviceInstallers
> branch you have a value name with the GUID of your class with
> REG_MULTI_SZ string "WmiProp.dll, WmiPropCoInstaller".

Yeah it seems the WMIprop isnt getting loaded.
Yes the above mentioned registry key seems to have beeb set.
I wonder what could be going on here.

>
>
> > Some of this stuff needs to be documented better if it changes or
> > behaves differently.
> >
> > are you sure there is nothing else required in the INF ?
> --
> Acording to our *.inf file there is nothing else related to WMI in it.
>
> Regards,
> Gennady Mayko.