Reputation: 7728
I'm trying to do an application that basically emulates the add /remove programs feature of Windows Control Panel. I'm currently using the registry, I don't use
WMI
because is SO SLOW and only returns the software installed by a .msi
file, There are the keys I'm currently reading:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
HKCU\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
and i have i think all the software installed but there is a problem with the icons, i dont know how to extract the icons that appear on control panel. Some keys have a DisplayIcon property but some other doesn't. I try two things:
First extract the icon for the Application on the DisplayIcon
Key.
Second, Try to identify the C:\Windows\Installer\FOLDER
to extract a icon for some file there. But is not perfect, i obtain only about 80% of the icons. I know there is a lot of programs that can do this very well.. for example "SoftwareInformer
".
I read about it and i found information about ARPPRODUCTICON
and WiX
an a Icon Table
, but i'm not sure where is that table and is there any way to access to it.
Also i search for an open source application that do this without luck.
Upvotes: 2
Views: 4973
Reputation: 11
If it's Windows native icons that you're looking for, you probably have more places to find them than you think (already on your own machine).
I stumbled across this informational link while troubleshooting the 'remove shortcut arrows from icons' issue. It is very likely that you will find what you're looking for after reading the information on the link below. The link is informational only in nature and offers no downloading of icons (after all, they're already on your computer).
https://diymediahome.org/windows-icons-reference-list-with-details-locations-images/
Upvotes: 1
Reputation: 641
I maybe too late for the party, but if you check under the
HKEY_CLASSES_ROOT\Installer\Products\{GUID}
you'll find "ProductIcon" string value with path (not for all products though). I think its basically the same as in {sys_drive}:\Windows\Installer{GUID} folder. But even "Programs & Features" doesn't show all the icons.
PS: And, of course I cant post an image, 'cause I don't have enough points, doh..
Upvotes: 5
Reputation: 7193
if you are able to get path of your installed exe (get that from registry value)
the use this method
radiobutton.Image = Icon.ExtractAssociatedIcon(_fullPath).ToBitmap();
//_fullPath is path of your exe file, if exe have an associated icon them it works perfectly
it is working 100% for me
Upvotes: 0
Reputation: 11
Not all applications listed in the control panel applet have an "application" icon - some just use the default icon for example, "Microsoft Device Emulator (64 bit) version 3.0 - ENU"
Upvotes: 1