Install feature via MSI API

Got a problem you cannot solve? Try here.
Post Reply
iti
Posts: 26
Joined: Mon Oct 19, 2009 7:05 am
Location: Dresden, Germany
Contact:

Install feature via MSI API

Post by iti »

Hi,

we have the following feature structure in our setup(simplified):

1. Base Program
2. Sample Files

What we want to do is install feature 2 when the user requests a sample file inside the main application. This should be no problem as MSI has an API and an API function that installs a feature from an MSI-File:

http://msdn.microsoft.com/en-us/library ... 85%29.aspx

When we tried to call the "MSIInstallMissingFile" Feature we have to provide the product-guid (which is no problem) and the filename of the file to be installed (this doesn't work). I had a look at the MSI with "Orca" and I saw that there are no real "Features" in the MSI like I defined in InstallAware. We have 15 Features defined in the setup but 793 features in the table. An there are no real identifiers in Title or Description that I can access only cryptic feature IDs.

When I try to access the "Filename" property in the "File"-Table the MSIInstallMissingFile() function fails with a "FileNotFound"-error. I tried all name structures "Shortname|Longname", "Shortname" and "Longname" only. Nothing works.

What am I doing wrong? Is there another way to install a feature from inside an application or are the MSI files that Installaware generates no real MSI files?

Thank you in advance,


Ciao,

Sven
Post Reply