cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Raffee
Level 3

Checking selected features

How can I check which features are selected to be installed? (Basic MSI project).
Strangely, IS allows me to link SQL Scripts and files to specific features, but not custom actions and IIS components (App Pools, Virutal Directories, etc...)

When creating custom actions we can set a condition, so I thought maybe I can have a condition like "IF FEATURE X SELECTED"
How can I accomplish this?
Labels (1)
0 Kudos
(4) Replies
rguggisberg
Level 13

In regard to the IIS question...
[Corrected] Just make sure the selected component is associated with the desired feature.
Don't really need the second screen shot below... but I don't see how to delete it!
0 Kudos
Raffee
Level 3

Thanks 🙂 this seems to work.
IT looks like I can't do the same to custom actions and dialogs, since they are not registered as components, yeah? Is there a workaround?
0 Kudos
rguggisberg
Level 13

Raffee wrote:
How can I check which features are selected to be installed? (Basic MSI project).
Strangely, IS allows me to link SQL Scripts and files to specific features, but not custom actions and IIS components (App Pools, Virutal Directories, etc...)

When creating custom actions we can set a condition, so I thought maybe I can have a condition like "IF FEATURE X SELECTED"
How can I accomplish this?


To determine if a feature is selected do something like this in your CA..
if (MsiEvaluateCondition(hMSI,"Not Installed And &YourFeatureName=3") = MSICONDITION_TRUE ) then
0 Kudos
rguggisberg
Level 13

Raffee wrote:
Thanks 🙂 this seems to work.
IT looks like I can't do the same to custom actions and dialogs, since they are not registered as components, yeah? Is there a workaround?


For Dialogs you can add a condition to the 'NewDialog' Event (this is typically on the 'Next' button of the previous dialog). A condition might look like this:

(FEATURE_SELECTION_IS_VALID="1") AND &YourFeatureName=3
0 Kudos