PDA

View Full Version : Feature-State vs. Feature-Action in Basic MSI



gridman
07-18-2007, 11:15 AM
I have read the Help topic, "Conditional Statement Syntax", but am still not totally clear on the difference between Feature-State and Feature-Action.

I have a Basic MSI installation where during the initial install, a dialog (MyDialog) is conditionally displayed based on whether the user has selected a specific feature for install in the CustomSetup dialog. To do this, I am using &FeatureName=3 in a Next button event of CustomSetup.

However, I also want to display MyDialog during the maintenance install if the user has selected the feature, but not display it if he has decided not to install the feature. This is the part I am having a problem with.

Any suggestions?

Stefan Krueger
07-18-2007, 12:48 PM
Something like this should do it:
&FeatureName=3 Or (!FeatureName=3 And Not &FeatureName=2)

gridman
07-18-2007, 01:19 PM
That solution worked perfectly. Thank you!

mano.n.s75
11-09-2010, 01:03 AM
I still didnt get it :(
can you tel me whats the difference between the feature action and feature state??
Mano

Stefan Krueger
11-10-2010, 07:47 AM
Feature state is the state the feature is in when the setup program starts. For a first time install this would be "absent", later - in maintenance mode or uninstall - it might be "local" (or still "absent" if the user un-selected the feature on the custom instalaltion dialog).

Feature action is the state that the setup will put the feature in, i.e. what it will be at the end of the setup. In this case "absent" means the feature will be uninstalled.