Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Conditional Install Levels in a Feature


4 replies to this topic

Seany

Seany
  • Full Members
  • 64 posts

Posted 04 July 2013 - 17:30

Hi

I have an install with two Setup Types; Setup1 and Setup2

 

I have 3 Features, F1, F2 and F3

 

F1 needs to be installed for both Setup1 and Setup2.

F2 needs to be installed for Setup 1

F3 needs to be installed for Setup 2

 

Im ok with Setup 1 as i set the project install level to 100 and the feature install level to 100 for F1 and F2. Install level is 101 for F3. So if i select Setup1 only F1 and F2 get installed which is correct.

 

When I select Setup2 I set the INSTALLLEVEL=200 using a condition on the Next button.

So this will install all 3 Features but I don't want Feature F2.

 

To stop F2 being installed when I select Setup2 I thought I could just have a Feature Condition in Feature F1 as follows:

Level: 201   _IsSetupTypeMin="Setup2"

 

but this doesnt work. I've also tried the Condition Level201:  INSTALLLEVEL>100 but that also does not work.

Shouldn't these set the install level of the feature to be 201 and stop it being installed as the project level is 200?

 

Can anyone tell me how to solve this?

Thanks



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 08 July 2013 - 19:17

Feature conditions don't work on dialogs because they are evaluated during CostFinalize, which runs before the dialogs. Instead, use control events like AddLocal and Remove to select/unselect features appropriately depending on the radio button selection.



Seany

Seany
  • Full Members
  • 64 posts

Posted 15 July 2013 - 11:59

Thank you very much for your help :)



bobikua

bobikua
  • Full Members
  • 1 posts

Posted 08 May 2014 - 10:39

HI

I have option of feature "Required - "Yes""

Could you please tell me how I can set state of feature "This feature will be installed when required" using event or disable("Remove" - not working)?

 

Thanks



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 08 May 2014 - 17:11

bobikua,

are you talking about the FeatureTree dialog? This article might help you setting or removing the options are needed: http://www.installsi...etupOptions.htm