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.
How to change feature's state at runtime?
Started by
pedro357
, Nov 11 2004 12:41
8 replies to this topic
Posted 11 November 2004 - 12:41
Hi all,
I'd like to change the state of some features (enable/disable) in the Select Features Dialog at runtime e.g. check locale and enable spell checker/thesaurus to current locale (or something else as default). Is there a way to achieve the above?
Thanks in advance.
I'd like to change the state of some features (enable/disable) in the Select Features Dialog at runtime e.g. check locale and enable spell checker/thesaurus to current locale (or something else as default). Is there a way to achieve the above?
Thanks in advance.
Posted 11 November 2004 - 13:21
You cannot disble features. You can make them unselected by default, or you can hide them (invisible and not installed). Both can be done using Feature Conditions. To make the feature unselected set it's install level to a value higher than the INSTALLLEVEL property in property manager if the condition is true. To hide it, set its level to 0 if the condition is true.
Stefan Krüger
InstallSite.org twitter facebook
Posted 11 November 2004 - 14:20
Actually I do not want to disable features. What I want is to select/unselect some features depending on the user settings at runtime i.e. on different computers initially selected features to be different (depending on some condition). I'm going to use a custom action to detect whether a feature should be selected or not. So the question is how to bind this custom action to a particular feature or how I can manipulate a feature properties inside in the custom action.
Posted 11 November 2004 - 15:17
In your previous post you said you want to baser the conditions on the locale. You can use feature cinditions for this.
If you need to base the conditions on user input, use AddLocal and Remove control events. There's no need for custom actions.
If you need to base the conditions on user input, use AddLocal and Remove control events. There's no need for custom actions.
Stefan Krüger
InstallSite.org twitter facebook
Posted 11 November 2004 - 16:09
OK, I'm sure you are right! But I have not idea how to create a condition that can set install level of a particular feature to e.g. 4. Can you help me, please?
Posted 11 November 2004 - 19:09
That depends on the tool you are using. In the end, you need an entry in the Condition table of the MSI.
Stefan Krüger
InstallSite.org twitter facebook
Posted 12 November 2004 - 08:25
The tool is Orca. So I need a "pure" condition to put into Condition table. But how whould look like such condition i my case? Also is it possible if a condition bound to a feature is FALSE then another condition to be applied?
Posted 12 November 2004 - 08:57
Your entry in the Condition table could look like this:
Feature: SpellChecker
Level: 999
Condition: UserLanguageID <> 1033
Or you could use SystemLanguageID. These are described in MSI help.
You can have multiple entries for one feature, if the level is different for each row. Otherwise you can build conditional expressions like this:
(UserLanguageID <> 1033) Or (VersionNT > 500)
Feature: SpellChecker
Level: 999
Condition: UserLanguageID <> 1033
Or you could use SystemLanguageID. These are described in MSI help.
You can have multiple entries for one feature, if the level is different for each row. Otherwise you can build conditional expressions like this:
(UserLanguageID <> 1033) Or (VersionNT > 500)
Stefan Krüger
InstallSite.org twitter facebook