Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

How to use Msi API to get ARP "Display Icon"?


2 replies to this topic

cuiqimeng

cuiqimeng
  • Full Members
  • 4 posts

Posted 31 October 2009 - 14:09

As what we see in "Add/Remove Programs"(ARP), each application has an icon.

Using the MSI API "MsiGetProductInfo" with the parameter "INSTALLPROPERTY_PRODUCTICON", we can get the icon.

However, this approach will not always succeed.

Actually, ARP will firstly look for:
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall \ {Product Code} \"DisplayIcon",

My question is, how can I get the above register path with some (MSI)APIs?
I don't want to Hard code there to read them, as I suspect the register path might be different in different OS(XP, Vista, Win7..)

Edited by cuiqimeng, 31 October 2009 - 15:03.


VBScab

VBScab
  • Full Members
  • 436 posts

Posted 02 November 2009 - 09:29

[sigh]If only you'd Googled for MSIGetProductInfo...

It would have turned up a link to the MSDN article about MSIGetProductInfoEx, to which you pass the ProductCode.
- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.

cuiqimeng

cuiqimeng
  • Full Members
  • 4 posts

Posted 02 November 2009 - 14:23

Thanks for your reply.

However, in some case, MSIGetProductInfoEx(or MSIGetProductInfo) can't get the display icon while ARP does.

I'm curious about how can ARP do that by (MSI) API?