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

Find the cached MSI file for an installed app


2 replies to this topic

jdoyle

jdoyle
  • Members
  • 4 posts

Posted 14 July 2003 - 19:35

I need to run some queries on a MSI database from an app after it's been installed. Looks like that starts with MSIOpenDatabase(), which requires a path to a .MSI file. However, I'd like to use the cached MSI file in [WindowsFolder]Installer, as the original MSI file might not be available. So, the question is, how does an app determine the cached MSI file it was installed with? Is there something more elegant than iterating and opening each file in the directory, checking if it matches the app's product code?

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 16 July 2003 - 07:21

Try using MsiGetProductInfo and query "INSTALLPROPERTY_LOCALPACKAGE".

If that does not work, then you can open the registry and find the value from there.

jdoyle

jdoyle
  • Members
  • 4 posts

Posted 18 July 2003 - 18:16

Thanks, that was it.

I thought I'd learned to RTFM by now.