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

Single MSI package or not ?


3 replies to this topic

edreux

edreux
  • Full Members
  • 2 posts

Posted 23 November 2010 - 14:37

Hello,

I'm trying to parse a MSI file to determine if it's a single file or not.
If not, I want to determine the name of the dependant files or directory.

Could you tell me in which propertie is it stored?

Thank you very much.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 24 November 2010 - 10:56

You mean you need to find out if the application files/CAB are stored inside the .msi file or separately? If it's internal, then there will be a separate stream for it inside the COM Structured Storeage which is the format of the msi file.

edreux

edreux
  • Full Members
  • 2 posts

Posted 24 November 2010 - 21:13

Hi Stefan

thanks for your answer. You exactly understood my need.

Since I'm doing it programmatically, what I suppose I need is the name of the property where it is stored:
Here are the main lines of code:

WindowsInstaller.Database database = InstallerObj.OpenDatabase(MsiFilename, MsiOpenDatabaseMode.msiOpenDatabaseModeReadOnly);
View view = database.OpenView("SELECT `Property`,`Value` FROM Property");

switch (Property)
{
case "ProductCode":
Result.ProductCode = Value;
break;
case "UpgradeCode":
Result.UpgradeCode = Value;
break;
etc...
}


I tried to browse the MSI with MSI viewers utilities and did not manage to determine where it is stored.


Regards.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 25 November 2010 - 13:19

It's not in a property. It's not in the msi database itself.
In the msi file, which is a COM structired storage (like a file system inside a file), there are multiple streams: the msi database, the summary information stream (which does have a flag to indicate compressed or loose files, but not external or internal) and optinally a stream the holds the CAB file if it has been streamed into the msi file instead of using external CAB.