简体   繁体   中英

How to obtain the icons from add / remove programs Control Panel

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.

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..

并非控制面板小程序中列出的所有应用程序都有“应用程序”图标-有些只是使用默认图标,例如“ Microsoft Device Emulator(64位)版本3.0-ENU”

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

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM