PDA

View Full Version : How to get Feature Property "Include Components" at runtime?



RichardC
11-04-2003, 01:53 PM
I went through all the online documentation and was unable to find any InstallShield Script function which would return a list of "Include Components" for a given Feature.

Is this functionality supported? In InstallShield 5.5, we needed to create a external file which at runtime would be read for this information. Is this still necessary in DevStudio 9?

TsungH
11-04-2003, 02:57 PM
The information is stored in MSI. You can use Windows Installer automation interface to achieve your goal. Here is an article (http://www.installshield.com/news/newsletter/0302-articles/msiaccess.asp) on the topic.

RobCoon
11-04-2003, 03:16 PM
The above is true for MSI-based projects, but is not true for InstallScript projects.

Currently there is no function for reading which components are included by a feature. You would have to author your own solution for this similar to the one you described for for ISPro 5.5.

RichardC
11-04-2003, 03:43 PM
Thanks for the quick response. I'll continue to use the workaround using an external file which is read at runtime.

I would use the Misc property to store this information, but I am currently using this field for other purposes. I surprised that I still need to do this in DevStudio 9 and there is no function to access this information.

Thanks again!

RobCoon
11-04-2003, 03:56 PM
I'll write up a feature request, if there isn't already one.

Another work around you might want to consider is use the function FeatureFileEnum. This can be used to give you all the files installed by a particular feature. If you happen to know which files are unique to which components, you could determine the individual components that way. However, you have to make sure you don't rely on files that are in multiple components.