cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
bkrpri
Pilgrim

MsiEvaluateCondition on &FeatureName =3 always true

Hi,

I am using Basic Msi.

In the Custom Setup Dialog, after a feature has been selected, on click of Next, I launch a custom action which executes a install script.

Here, I execute the follwoing statements.
retVal1 = MsiEvaluateCondition(ISMSI_HANDLE, "&Feature1= 3");
retVal2 = MsiEvaluateCondition(ISMSI_HANDLE, "&Feature2 = 3");
retVal3 = MsiEvaluateCondition(ISMSI_HANDLE, "&Feature3= 3");

Here all the three statements return TRUE, irrespective of which feature has been selected.

How do I get the selected Feature in the script?

Thanks,
Priya
Labels (1)
0 Kudos
2 Replies

Re: MsiEvaluateCondition on &FeatureName =3 always true

I've found that there are problems in MSI native UI in that the control event conditions are evaluated prior to the feature states actually changing.

The work around has been to do a NewDialog ExtraDialog 1 and on the ExtraDialog do you conditions that you mentioned. It'll work in that scenario.

I know, stupid/wierd but that's how MSI behaves. I usually try to work something into my UI to make it look like ExtraDialog actually has a purpose even though it really does not.
0 Kudos
prampe
Flexera beginner

Re: MsiEvaluateCondition on &FeatureName =3 always true

Use

MsiGetFeatureState(ISMSI_HANDLE, "Your Feature Id", nvInstallState, nvActionStateFeature);

...
if (nvActionStateFeature == 3) then
...       
endif;
0 Kudos