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: Conditionally installing a component based on whether a feature is installed.
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
‎Sep 15, 2008
12:49 PM
Conditionally installing a component based on whether a feature is installed.
I have a very important question that I need answered as quickly as possible.
I have a component (let's say Component1) that needs to be installed for FeatureA, but ONLY if FeatureB is not installed, because FeatureB will need to overwrite and register Component1 in a different area if it's chosen.
Does InstallShield allow for this, or do I have to create two separate installers instead? I found this thread: http://community.installshield.com/showthread.php?t=74982&highlight=conditionally+installing+component+based+feature+state and it seems to state that I'll need to create a DoActionControlEvent, however, since the Custom Setup dialog box in IS 2008 doesn't describe each member of the Feature Tree, I'm unsure precisely what to put in the Event Table columns in order to make this work.
Some clear, concise examples, perhaps just using the pseudonyms above, would help (or some other way of doing it would also help if there is one). Anything you can tell me is much appreciated...
I have a component (let's say Component1) that needs to be installed for FeatureA, but ONLY if FeatureB is not installed, because FeatureB will need to overwrite and register Component1 in a different area if it's chosen.
Does InstallShield allow for this, or do I have to create two separate installers instead? I found this thread: http://community.installshield.com/showthread.php?t=74982&highlight=conditionally+installing+component+based+feature+state and it seems to state that I'll need to create a DoActionControlEvent, however, since the Custom Setup dialog box in IS 2008 doesn't describe each member of the Feature Tree, I'm unsure precisely what to put in the Event Table columns in order to make this work.
Some clear, concise examples, perhaps just using the pseudonyms above, would help (or some other way of doing it would also help if there is one). Anything you can tell me is much appreciated...
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 16, 2008
09:29 AM
Anybody able to throw me a quick example of how to do this? Could really use some help and this is time-sensitive.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 16, 2008
09:52 AM
try to add condition to a component
&FeatureB=2
did u think to use INSTALLLEVEL property ?
&FeatureB=2
did u think to use INSTALLLEVEL property ?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 16, 2008
10:33 AM
I tried this already - In order to test this functionality I've created some random sample code in IS 2008 Pro -
The sample code Feature List looks like this:
Feat1 -> Installs Batman.txt
Feat2 -> Installs Catwoman.txt
Sub1 -> Installs Joker.txt, and is set to InstallLevel2
Sub2 -> Installs TwoFace.txt and is set to InstallLevel2
Both Sub1 and Sub2 features have a condition -
InstallLevel Condition
1 &Feat1>=2
I then run the program - no matter what I do, Joker and TwoFace are installed on the machine. The link I posted earlier said that conditions are evaluated during costing, not during CustomSetup, so I don't think I can use normal Conditions for this. Does anyone have any ideas?
(Of note, obviously the topic of this thread is conditionally installing a component, not a subfeature, but I read somewhere a few minutes ago that features would be easier to evaluate than components so I changed it to a subfeature - but if changing it back to a component will make a difference, let me know.)
The sample code Feature List looks like this:
Feat1 -> Installs Batman.txt
Feat2 -> Installs Catwoman.txt
Sub1 -> Installs Joker.txt, and is set to InstallLevel2
Sub2 -> Installs TwoFace.txt and is set to InstallLevel2
Both Sub1 and Sub2 features have a condition -
InstallLevel Condition
1 &Feat1>=2
I then run the program - no matter what I do, Joker and TwoFace are installed on the machine. The link I posted earlier said that conditions are evaluated during costing, not during CustomSetup, so I don't think I can use normal Conditions for this. Does anyone have any ideas?
(Of note, obviously the topic of this thread is conditionally installing a component, not a subfeature, but I read somewhere a few minutes ago that features would be easier to evaluate than components so I changed it to a subfeature - but if changing it back to a component will make a difference, let me know.)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 17, 2008
05:11 AM
Maybe this will help?
http://www.joyofsetup.com/tag/windows-installer/
see:Feature states in component conditions
http://www.joyofsetup.com/tag/windows-installer/
see:Feature states in component conditions
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 17, 2008
12:21 PM
He only talks there about how the documentation is not complete, he doesn't give any concrete examples of how to do this. I have sent him a question asking if he knows any examples off the top of his head, but I don't know if he'll answer.