cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bkrpri
Level 2

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
Christopher_Pai
Level 16

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
elganzo
Level 3

Use

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

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