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.
Multiple Conditions for a Feature?
Started by
Matthias1967
, Nov 10 2008 07:44
8 replies to this topic
Posted 10 November 2008 - 07:44
Hi,
as far as I have understood the doucumentation, it is possible to add multiple conditions for a given feature via the Components table, setting different feature install levels each.
However, I found nothing about what happens if those conditions are not mutually exclusive. Is there a certain order in which the conditions are evaluated, or is the behaviour just unpredictable?
Regards,
Matthias
as far as I have understood the doucumentation, it is possible to add multiple conditions for a given feature via the Components table, setting different feature install levels each.
However, I found nothing about what happens if those conditions are not mutually exclusive. Is there a certain order in which the conditions are evaluated, or is the behaviour just unpredictable?
Regards,
Matthias
Posted 12 November 2008 - 01:20
A condition is evalated as either TRUE or FALSE.
Do you mean the order in which the table rows are processed?
I'm not sure if this is documented anywhere. Best bet is to code you conditioning to avoid this.
Do you mean the order in which the table rows are processed?
I'm not sure if this is documented anywhere. Best bet is to code you conditioning to avoid this.
Posted 12 November 2008 - 08:07
Hello Luke,
Yes, each condition is evaluatdda se ither TRUE or FALSE. But if it is true, it sets the install level of the corresponding feautre. And I think this can be very ambiguous.
Yes, each condition is evaluatdda se ither TRUE or FALSE. But if it is true, it sets the install level of the corresponding feautre. And I think this can be very ambiguous.
Posted 12 November 2008 - 09:58
QUOTE (Matthias1967 @ 2008-11-12 07:07) |
Yes, each condition is evaluatdda se ither TRUE or FALSE. But if it is true, it sets the install level of the corresponding feautre. And I think this can be very ambiguous. |
Is this something like what you have:
...If IE7PRESENT InstallLevel=700
...If Not IE7PRESENT InstallLevel=600
or something more complex (silly, pointless logic, but I'm illustrating my question):
...If IE7PRESENT INSTALLPLUGINVERSION=7
...If Not IE7PRESENT INSTALLPLUGINVERSION=6
IF INSTALLPLUGINVERSION=7 InstallLevel=700
IF INSTALLPLUGINVERSION=6 InstallLevel=600
- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.
Posted 12 November 2008 - 11:58
The documentation doesn't specify a particular order in which the rows of the Condition table are evaluated. It might even stop at the first TRUE condition it finds. So to get deterministic behaviour, make sure oyur conditions are mutually exclusive.
Also I think it's a rather unusual situation if you need to set the feature's install level to 100 in one case, to 200 in another case, and to 300 in yet another case. So to better understand your needs, could you tell us more about your requirements and why you need to do this?
Also I think it's a rather unusual situation if you need to set the feature's install level to 100 in one case, to 200 in another case, and to 300 in yet another case. So to better understand your needs, could you tell us more about your requirements and why you need to do this?
Stefan Krüger
InstallSite.org twitter facebook
Posted 14 November 2008 - 15:44
I wanted to use the global install level to define some setup types.
Then my original idea was something like
if (bCondition1) installlevel=100;
if (bCondition2) installlevel=200;
if (bCondition3) installlevel=300;
as a "shorthand" for
if (bCondition1 && !bCondition2 && !bCondition3) installlevel=100;
if (!bCondition1 && bCondition2 && !bCondition3) installlevel=200;
if (!bCondition1 && !bCondition2 && bCondition3) installlevel=300;
Then my original idea was something like
if (bCondition1) installlevel=100;
if (bCondition2) installlevel=200;
if (bCondition3) installlevel=300;
as a "shorthand" for
if (bCondition1 && !bCondition2 && !bCondition3) installlevel=100;
if (!bCondition1 && bCondition2 && !bCondition3) installlevel=200;
if (!bCondition1 && !bCondition2 && bCondition3) installlevel=300;
Posted 19 November 2008 - 10:08
Now I'm confused. Are you talking about the INSTALLLEVEL property, or about the install levels of features which can be changed using the Condition table?
Stefan Krüger
InstallSite.org twitter facebook
Posted 23 November 2008 - 11:43
Sorry for the inconvenience. I am talking about the install level of a feature.
Posted 24 November 2008 - 14:32
I think this shorthand just won't work reliably.
Stefan Krüger
InstallSite.org twitter facebook