- Revenera Community
- InstallShield Forum
- Re: Feature level condition
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Printer Friendly Page
Feature level condition
I'm trying to install a particular feature only in Major upgrade mode. For which I have set the default "Install Level = 0" for that particular feature and added a condition as below.
Condition: Level = 3, IS_MAJOR_UPGRADE
but it is not working.
Is there any workaround? Or am I missing anything.
To install a feature only on major upgrade, then you need to set the install level in feature to 0, so that it wont install by default,
and then add the condition as your doing IS_MAJOR_UPGRADE
then build and install on clean install, this specific feature with install level 0 and condition added wont install,
If we create a major upgrade and then install, the next version, this feature will get installed,
Refer attached sample and screenshot
Thank you for the quick reply.
Also wanted to know about the un-installation behavior, I assume the feature will stay back because of this setting.
How can we get this feature removed at time of uninstallation?
With major upgrade condition, im not able to uninstall the feature,
However, You can achieve it by set the property value,
Create a feature and set the install level to 0, and create a project and set value to 100
go to property manager and create a global property TEST and set value 0.
and at run time you need to pass this value TEST=100, when we pass this value this feature will be installed, to uninstall we need to pass the same command and select remove on UI it will remove the feature.
Attached sample ism will be helpful,
For your requirement instead of InstallLevel property you can use the ADDLocal property and set this using customaction which will help you to achieve your desired results,
I have added 2 Set property Customaction, one will execute in clean installation time, and other will execute only in major upgrade time, (however you need to handle the repair and modify scenario's by setting proper conditions to CA)
Im sharing a sample, when you install the setup.exe from release1 Disk1 folder it will install only file "Feature1_Comp1.txt"
when we install Setup.exe(a Major upgrade setup) from Release 2_Major --> Disk1 folder it will install both Feature1_Comp1.txt and Feature2_Comp2.txt
Refer attached screenshots and sample project files.
Hope it helps
Thanks Varul, I'll try implementing this.