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
- :
- Conditional feature installation
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Sep 17, 2018
04:56 AM
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?
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?
(1) Reply
Sep 19, 2018
10:02 AM
Here is how I handle Feature conditions:
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.
- 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.