This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: MsiEvaluateCondition on &FeatureName =3 always true
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 06, 2012
01:03 AM
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
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
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 06, 2012
07:36 AM
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.
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 16, 2019
11:53 PM
Use
MsiGetFeatureState(ISMSI_HANDLE, "Your Feature Id", nvInstallState, nvActionStateFeature); ... if (nvActionStateFeature == 3) then ... endif;