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
- :
- feature condition: how does it work?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 02, 2008
03:07 AM
feature condition: how does it work?
(Installshield 2008, Basic MSI)
Does the "Condition" entry of a feature work as expected?
I want to install a feature if and only if a property INSTALL_FEATURE is set.
Now, I gave the feature the "Install Level" 200 which is higher then the level of the package and added the following condition:
Level 1, Condition INSTALL_FEATURE.
Unfortunately, I noticed that this condition is ignored, whatever the value of property INSTALL_FEATURE is.
I solved the issue by calling MsiSetFeatureState from an Installscript-CA instead - but I would be glad to know how the "Condition" entry of a feature works.
Thanks in advance, H.
Does the "Condition" entry of a feature work as expected?
I want to install a feature if and only if a property INSTALL_FEATURE is set.
Now, I gave the feature the "Install Level" 200 which is higher then the level of the package and added the following condition:
Level 1, Condition INSTALL_FEATURE.
Unfortunately, I noticed that this condition is ignored, whatever the value of property INSTALL_FEATURE is.
I solved the issue by calling MsiSetFeatureState from an Installscript-CA instead - but I would be glad to know how the "Condition" entry of a feature works.
Thanks in advance, H.
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 02, 2008
02:44 PM
How are you setting INSTALL_FEATURE? One thing to keep in mind is that MSI evaluates feature and component conditions when CostFinalize runs, so if you're changing INSTALL_FEATURE after that, it may be too late...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 24, 2008
10:04 PM
I'm struggling with the same issue. My INSTALL_FEATURE condition is being ignored it seems. I have gone as far as to set a condition as 1=2 (which I would expect should always evaluate to false) with my feature Install Level set at 200 and the installer INSTALLLEVEL set to 100, yet my feature still gets installed every time. Presumably there's no dependency on something occurring before or after CostFinalize (given the 1=2 condition) so I'm not sure why the condition is ignored (or seemingly ignored). Even more confusing is that with the feature's Install Level set to 200 with NO condition set, the feature is still installed (granted it was the only feature and was selected for the Setup Type, but I wouldn't expect it to install based on my understanding of INSTALLLEVEL).
Am I missing something??? How does one set a feature to be selected, and then conditionally install it or not behind the scenes? Note that the feature is not showing in the custom feature selection dialog so it seems the Install Level setting on the feature is working, but why would it still install the feature anyway? The feature is not listed as required. So frustrated with this...
Am I missing something??? How does one set a feature to be selected, and then conditionally install it or not behind the scenes? Note that the feature is not showing in the custom feature selection dialog so it seems the Install Level setting on the feature is working, but why would it still install the feature anyway? The feature is not listed as required. So frustrated with this...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 25, 2008
12:00 AM
Try setting the install level for the feature set to 0(zero). This will make sure that the feature is not installed.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 25, 2008
05:00 PM
Setting the INSTALLLEVEL to 0 does keep it from being installed, however, when I tried to uninstall the application, it gives a message similar to "...only for features installed" (I didn't write it down and don't feel like recreating it again ;)) and then aborts. Anyway, manually removed it from the system using regedit, but guessing then that using 0 as the default level isn't an option. Thanks for the suggestion. I may need to resort to call "MsiSetFeatureState" from a CA like "heiner_violet" did.
![](/skins/images/8C9D13A71C7F7695F3262372C0172D68/responsive_peak/images/icon_anonymous_message.png)