cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mcilis
Level 4

Install Conditions

Hello,

I have a question about "Install Conditions" in a Basic MSI project...

I have three installation conditions, I want to specify the order of the execution of these install conditions.

For example two of these conditions return false. But second condition's message appear.

How can I determine that the first condition's message to appear. In other words how can I determine one of the conditions to be checked before the others???

Thanks,
Labels (1)
0 Kudos
(5) Replies
Kelter
Level 10

So, you have three conditions, C1, C2, C3, and you want to make sure that the message associated with C1 is displayed if C1 fails, regardless of whether C2 or C3 fail.

Assuming that C1, C2, C3 is the order of precedence in your conditions, you should try this:

Replace "C2" with "C2 AND NOT C1".
Replace "C3" with "C3 AND NOT C2 AND NOT C1"

It might be kindof hacky, but since you can't assert the order in which the conditions are evaluated, this is the next best thing, and it'll do the trick.
0 Kudos
mcilis
Level 4

Thank you,

But I think your senario will not work. Let me give you an example;

Assume that C1 is true then for the second conditon (C2 AND NOT C1) it will always be false regardless of C2...

This can not be acceptable...

However, I found a logic operator named IMP. In the help its definition is given as:

TRUE if left term is FALSE or right term is TRUE

So if I do something like the following I think I can create an order for the installation conditions:

For the second condition: NOT C2 IMP NOT C1

Assume that C1 is true then if C2 is false the condition is false and if C2 is true the condition is true.

Assume that C1 is false then this condition is true regardless of the C2 but when the other condition (C1) is executed then the C1 condition's error will be shown...

I think this scenario may work, I have to test it...
0 Kudos
Kelter
Level 10

Okay, you caught me at the end of a long day. 😛
We are actually writing the condition that will make the message NOT appear, so if we write our conditions as such, then Messages 1, 2, and 3 would be suppressed based on the following:

Message1:    C1
Message2: C2 OR NOT(C1)
Message3: C3 OR NOT(C2) OR NOT(C3)


Those are the conditions you would use. If it helps here are the conditions under when the messaegs would be displayed:
Message1:    NOT(C1)
Message2: NOT(C2 OR NOT(C1))
= NOT(C2) AND C1
Message3: NOT(C3 OR NOT(C2) OR NOT(C3))
= NOT(C3) AND C2 AND C3


I was close...:o
0 Kudos
mcilis
Level 4

Hello,

Thank you for the help. This structure works. 🙂
0 Kudos
Kelter
Level 10

Thanks...although upon re-reading my response, I realize that I mistyped the Message 3 line:

Message3: C3 OR NOT(C2) OR NOT(C3)

should be

Message3: C3 OR NOT(C2) OR NOT(C1)

...but you knew that already. Boy, I must be slipping. 2 glaring logical errors in one thread.
0 Kudos