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 installation of Features
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
‎Dec 24, 2008
09:30 AM
Conditional installation of Features
I have a plug-in application for a few applications like IE, Firefox. IE files are different than Firefox. I have implemented this as features for each application and user can choose to install what application(s) to install the plug in for (Custom install).
What I would like to do is that if Firefox is not installed on the machine then the user shouldnt be able to choose to install Firefox plug-in. How can I achieve this?
I dont think I can use "Condition" which alters the install level of the feature, can I?
Thanks in advance.
What I would like to do is that if Firefox is not installed on the machine then the user shouldnt be able to choose to install Firefox plug-in. How can I achieve this?
I dont think I can use "Condition" which alters the install level of the feature, can I?
Thanks in advance.
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 24, 2008
10:45 AM
Actually, one option is to conditionally set the feature's install level to 0, which hides the feature in addition to not installing it.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 26, 2008
02:07 PM
Thanks, that did the job for me.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2009
05:29 PM
RobertDickau wrote:
Actually, one option is to conditionally set the feature's install level to 0, which hides the feature in addition to not installing it.
Is there any specific thing you need to do to cause these conditions to be re-evaluated?
Example: 2009 Basic MSI project.
I have a condition on "Feature1":
Level: 0
Condition: TEST_HIDE
If I set TEST_HIDE to a value in a custom action before the CustomSetup dialog (I've tried in both the InstallWelcome and the SQLLogin dialog), my MSI log shows that the value was set, but when Custom Setup is rendered -- the feature is there and visible in it's default state.
However, if I pass TEST_HIDE=1 in a command line argument so that it's set at the very beginning of the installation -- it successfully disables and hides the feature.
My ultimate goal is to set the state of 2 different features from information determined at pre-install time (SQL Login)... The features basically determine if I'm going to perform a new installation of an application database, or a conversion of an existing one.
EDIT: I have done some testing and verified that if the property is set before CostFinalize (UI) -- the feature will disappear, if it's after CostFinalize -- the condition is ignored. I really want to be able to completely hide features based on information gathered in the SQLLogin dialog. In my previous installs I have used the method MsiSetFeatureState to disable the feature, but that has always allowed a user to re-enable it manually and I like the idea of completely hiding it.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 16, 2009
11:56 AM
Hi - Any update on re-evaulating feature conditions during the UI as it is exactly what I need to do as well...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 16, 2009
06:40 PM
The Windows Installer CostFinalize action is responsible for evaluating feature and component conditions. Since the user interface runs after this action has run, any changes to feature conditions will not be reevaluated. Typically, our recommendation is to use a custom action (with MsiSetFeatureState) or AddLocal/Remove control events to update the feature states as needed. Unfortunately this does not allow for hiding features.
