cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Avner_Kashtan
Level 4

MSI Variable based on selected feature.

Good morning, everyone.

I'm building a Basic MSI project in InstallShield 2008 and I've defined several features in my installation. I have some code, currently sitting in a C# Installer class, that I want to call from within my installation.
What my installer class logic needs is to know which features were selected during installation, so it can perform the right steps. So if I have the following feature tree:

Core Feature
Subfeature A

Subfeature B


I want to be able to pass to the installer class variables such as:
/FEATURE_A=[IsFeatureAInstalled] /FEATURE_B=[IsFeatureBInstalled], and my code can take it from there.

Is there a way to do that in Basic MSI projects?
Labels (1)
0 Kudos
(2) Replies
chbiki
Level 6

Hi !
try to set a "property" as variable and insert the property value in the field "condition" by the feature options..
I hope this can help !
0 Kudos
Christopher_Pai
Level 16

First I'd reccomend that you not use Installer class CA's. They are a real failure. Marking your class ComVisible(true) and calling it from InstallScript CoCreateObjectDotNet() is a much better way to go.

That said, just pass the ADDLOCAL property to the Installer class CA using CustomActionData. This will have a , delimited list of features to be installed that you can search for with the string class IndexOf() method.

http://msdn2.microsoft.com/en-us/library/aa367536(VS.85).aspx
0 Kudos