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
- :
- Re: Adding a feature “conditionally”
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
Mar 29, 2012
01:10 PM
Adding a feature “conditionally”
Hello folks.
Here's the deal.
The current version of our product has 3 features.
The new version of our product has 4 features.
By default, Feature 4 has an Install Level of 200.
(So it will not be installed automatically. It needs to be selected.)
Our Client has asked that, during a major upgrade, I look for the presence of a file on the hard drive.
If I find this file, I should install this new 4th feature.
If I don't find the file on the hard drive I should NOT install the 4th feature.
That SOUNDS simple enough.
But, I can't seem to make this happen.
I find the file on the hard drive alright.
Then I set a public property to a value of Yes.
(I do this with an InstallScript custom action.)
In Feature 4's description, I have a condition that sets the Level to 100.
Based on the condition of the public property having a value of "Yes".
(100 is the installations install level.)
It seems no matter what I do, this Fourth feature will not install during a major upgrade.
If I set the Feature description to an install level of 100, then Feature 4 installs just fine during a Major upgrade.
So, I don’t think there is an issue with the new 4th Feature.
Any ideas as to how I might proceed would be greatly appreciated.
Here's the deal.
The current version of our product has 3 features.
The new version of our product has 4 features.
By default, Feature 4 has an Install Level of 200.
(So it will not be installed automatically. It needs to be selected.)
Our Client has asked that, during a major upgrade, I look for the presence of a file on the hard drive.
If I find this file, I should install this new 4th feature.
If I don't find the file on the hard drive I should NOT install the 4th feature.
That SOUNDS simple enough.
But, I can't seem to make this happen.
I find the file on the hard drive alright.
Then I set a public property to a value of Yes.
(I do this with an InstallScript custom action.)
In Feature 4's description, I have a condition that sets the Level to 100.
Based on the condition of the public property having a value of "Yes".
(100 is the installations install level.)
It seems no matter what I do, this Fourth feature will not install during a major upgrade.
If I set the Feature description to an install level of 100, then Feature 4 installs just fine during a Major upgrade.
So, I don’t think there is an issue with the new 4th Feature.
Any ideas as to how I might proceed would be greatly appreciated.
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Mar 30, 2012
07:52 AM
If your major upgrade has some dialog, you can try to use AddLocal event on its “Upgrade Now” button.
Event - Addlocal
Argument - 4th feature name
Condition - public property
Event - Addlocal
Argument - 4th feature name
Condition - public property
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Mar 30, 2012
04:39 PM
You will want to take a look at the verbose installation log, and verify the file is indeed found, and the public property used in condition is set as expected.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Apr 02, 2012
10:18 AM
ElenaN,
Your suggestion works perfectly.
I can’t thank you enough. 🙂
I was wondering, if I could impose on you, a little bit more ?
The end user would like to run my installation program in "silent" mode.
Do you have any suggestions how I might code things, so that my installation program might add this same additional feature, if the installation program is run silently ?
Since there is no dialog, the "AddLocal BL BLSCFOUND", won't be executed.
"AddLocal BL BLSCFOUND" is what I added to the "Update" button in my dialog.
I have an InstallScript CA that runs in the User and Execute sequences, right after CostFinalize.
And this CA, sets the public property named BLSCFOUND. (Based on other things in the CA. And that, is working.)
I've been trying various things, I can't quite figure this out.
Suggestions would be GREATLY appreciated.
Your suggestion works perfectly.
I can’t thank you enough. 🙂
I was wondering, if I could impose on you, a little bit more ?
The end user would like to run my installation program in "silent" mode.
Do you have any suggestions how I might code things, so that my installation program might add this same additional feature, if the installation program is run silently ?
Since there is no dialog, the "AddLocal BL BLSCFOUND", won't be executed.
"AddLocal BL BLSCFOUND" is what I added to the "Update" button in my dialog.
I have an InstallScript CA that runs in the User and Execute sequences, right after CostFinalize.
And this CA, sets the public property named BLSCFOUND. (Based on other things in the CA. And that, is working.)
I've been trying various things, I can't quite figure this out.
Suggestions would be GREATLY appreciated.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Apr 11, 2012
08:35 AM
In case there is an interest, this issue has been resolved.
The solution was to set my public property "BLSCFOUND", via the System search facility.
Then, set the feature condition (to a value of "100") based on the presence of the PUBLIC property.
I "WAS" performing the system search via an InstallScript CA.
Which is okay.
But apparently, I had my CA incorrectly placed.
Using the System search ensures that setting of my public property, takes place early enough to be evaluated.
Thanks once again for everyone’s help.
You’re the greatest.
The solution was to set my public property "BLSCFOUND", via the System search facility.
Then, set the feature condition (to a value of "100") based on the presence of the PUBLIC property.
I "WAS" performing the system search via an InstallScript CA.
Which is okay.
But apparently, I had my CA incorrectly placed.
Using the System search ensures that setting of my public property, takes place early enough to be evaluated.
Thanks once again for everyone’s help.
You’re the greatest.
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)