Hello Group,
I have a need to display custom icon in the device manager for my device. BTW i am doing this in Vista and has followed the way it is described in the following document
http://download.microsoft.com/download/9/c/5/9c5b2167-8017-4bae-9fde-d599bac8184a/CustomIcon.docx
There was typo in the document and I have even corrected that. I have followed the step 3 specified in the document to display the icon. There is very little documentation available on this. I am able to find a similar question posted on the link http://www.techreplies.com/drivers-43/device-manager-icon-338818/ but there is also no solution present.
Steps followed in the inf:
I have created a separed resource only dll with just a small icon in it and i have copied that icon in to system32 folder with copy files section. Added a property device icon. I have even cross checked if my resource dll is getting copied to system32 or not. From there i have opened the dll and see if the resource icon is present in it or not. But still icon is not getting displayed. BTW my driver is a wdf kernel driver.
Here is the snipped of my inf file:
[MyDrv.INSTALL]
CopyFiles = MyDrv.CopyFiles,Drv_Icon_Copy
AddProperty=MyIconProperties
[MyDrv.CopyFiles]
MyDrv.sys
[MyIconProperties]
DeviceIcon,?%12%\MyIcon.dll,-1?
[Drv_Icon_Copyy]
MyIcon.dll
Does the method specified in the microsoft document has worked for any one?
Thanks a lot!!!
Small correction: In the above post double quotes are displayed as question marks. Looks like the site does not accept double quotes
Do you use a classinstaller ? If so , this will work :
[XXXClassReg]
HKR,0,%ClassName%
; If we don’t provide our own Installer32, ICON’s from “SETUPAPI.DLL” are to be selected
; HKR,Icon,-5
; HKR,Icon,-159
HKR,Installer32,“YYY.dll,ClassInstaller”
HKR,Icon,“105”
The “105” is the number of the 32x32 16 colors icon in the Icon Group of YYY.dll
Christiaan
----- Original Message -----
From:
To: “Windows System Software Devs Interest List”
Sent: Thursday, December 17, 2009 6:22 AM
Subject: RE:[ntdev] How to display custom icon in device manager tree
> Small correction: In the above post double quotes are displayed as question marks. Looks like the site does not accept double
> quotes
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Hello Christiaan Ghijselinck,
Thanks for your reply. Actually I am new to driver development. So is it mandatory to have classinstaller dll to display the custom icon? But the document does not tell that classinstaller is mandatory to display the custom icon. BTW if I follow the approach specified by you can display the custom icon for the class and not for the device right?
Thank you.
Note: When we tested this mechanism in 2006 on XP/Vista, “Update driver”
(from devmgmt.msc) did not change the device icon.
In fact “this behavior is by design”:
“[…] the system processes a ClassInstall32 section only if a [device
setup] class is not already installed […]”
See http://msdn.microsoft.com/en-us/library/ms794537.aspx
and http://msdn.microsoft.com/en-us/library/bb725833.aspx
Consequences:
(a) If you need to change the icon (for tests), make sure the device
setup class is deleted before a new install.
(b) If you roll out driver updates (and the old driver had a different
or no icon), better don’t rely on the new icon in the documentation.
(c) If you use DPinst or Win7, check if *they* update the icon.
(Doron? Can you comment on this?->Thanks!)
… can display the custom icon for the class and not for the device right?
Correct. I am not sure if you can display an icon for the device which is different from the one displayed in the class. I never
tried this myself , and I have never found an example in the device tree.
/C
----- Original Message -----
From:
To: “Windows System Software Devs Interest List”
Sent: Thursday, December 17, 2009 10:09 AM
Subject: RE:[ntdev] How to display custom icon in device manager tree
> Hello Christiaan Ghijselinck,
>
> Thanks for your reply. Actually I am new to driver development. So is it mandatory to have classinstaller dll to display the
> custom icon? But the document does not tell that classinstaller is mandatory to display the custom icon. BTW if I follow the
> approach specified by you can display the custom icon for the class and not for the device right?
>
> Thank you.
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
xxxxx@yahoo.com wrote:
Small correction: In the above post double quotes are displayed as question marks. Looks like the site does not accept double quotes
Well, the problem is that you’re using typographical double quotes,
where the open and closing quotation marks are angled in different
directions. Those glyphs are not present in the ISO-8859-1 character
set used by the mailing list.
“Normal” double quotes (ASCII 0x22) work fine.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Hello Hagen Patzke,
Sorry for the late reply.
In fact “this behavior is by design”: “[…] the system processes a ClassInstall32 section only if a [device setup] class is not already installed […]”
Yes I am using a new classID for my device. I am deleting the device and class from device manager tree before installing the driver.
Yes I have seen in the MSDN documentation that updating of driver does not change the icon.
Even after doing this also i am not able to display the icon.