cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jjb8297
Level 6

InstallScript If Logic

Greetings,


Is it possible to do Or/Ands in if statements.

Like in VB you would do
If condition = somevalue or condition=someothervalue then
do something
else
do something else
end if

I was trying to see this in the documentation, but didn't see it anywhere, so was wondering if this was possible.
Labels (1)
0 Kudos
(2) Replies
RobertDickau
Flexera Alumni

Yes, it works similarly to C; for logical-or:
if ((var1=1) || (var2=2)) then // etc.

And logical-and:
if ((var1=1) && (var2=2)) then // etc.
0 Kudos
jjb8297
Level 6

RobertDickau wrote:
Yes, it works similarly to C; for logical-or:
if ((var1=1) || (var2=2)) then // etc.

And logical-and:
if ((var1=1) && (var2=2)) then // etc.


Thank you.:)
0 Kudos