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

Conditional feature installation

Hello.

How can I make a feature on my InstallShield project to be installed only if a registry value contains a certain value? That value may be only "YES" or "NO".

I tried to configure a System Search like that :
Root : HKLM Key : Software\MyKey\the_key_to_check
Value : I let it blank
Store the value in this property : ISVALUE (a just created property, without any value), and "just store the value in the property".

Then, on my feature condition : Install Level : 1 Condition : Level:200, ISVALUE=YES
The attempted result is -> If MyValue equals YES, then install that feature, if not, don't install that feature. But it the condition seems to be never evaluated.

Could anyone help me to perform this task?
Labels (1)
0 Kudos
(1) Reply
DLee65
Level 13

Here is how I handle Feature conditions:

  • Install Level = 0 //Disabled by default
    • [Condition: Level = 3, ISVALUE ~= "yes"

  • Install Level = 3 //Enabled by default
    • Condition: Level = 0, ISVALUE ~!="yes"



The tilde character, '~', is to do a case insensitive comparison
It seems as if you do a similar type of thing. One thing to double check is the value of INSTALLLEVEL property in the MSI log file. Is this property 200 when you run the install?
Remember, INSTALLLEVEL property defaults to 1. Also, ADDLOCAL=ALL overrides INSTALLLEVEL and installs all features locally regardless of the value of the INSTALLLEVEL propety.

If the value of the Level column in the Feature table is 0, that feature is not installed and not displayed in the UI.
A feature is installed only if the feature level value is less than or equal to the current install level.
0 Kudos