cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mikegru
Level 4

Set Feature Install Level and CustomSetup

Basic MSI project with a handful of features. I created a custom dialog to allow the user to enter a license key. The key is validated on the click of the Next button which is tied to a Custom Action event. This custom action parses the key and sets a public property (for each feature) based on whether that feature should be installed.

Example:
FeatureA has 2 conditions:
Level = 0 FEATUREA_INSTALL=N
Level = 100 FEATUREA_INSTALL=Y

I have set up each feature with similar conditions using separate properties.

I want the end result to be that FeatureA is not displayed in the CustomSetup dialog if a certain part of the key says it shouldn't.

In the log I can see:
PROPERTY CHANGE: Adding FEATUREA_INSTALL property. Its value is 'N'.
But when I click to the CustomSetup dialog, it is still shown.

What am i missing?
Labels (1)
0 Kudos
(1) Reply
RobertDickau
Flexera Alumni

I think it's that Windows Installer evaluates those conditions when CostFinalize runs, which is normally before any dialog boxes are displayed.

If you need to do this, common practice seems to be to modify the in-memory MSI database; searching these forums for "hide feature at runtime" will turn up some examples in different languages.
0 Kudos