If $variable$

Test a condition against the $variable$ value. The $variable$ gets its input from the SetVariable command. The value can be tested against a constant or a system variable.

Example 1:

ASK1: "", prompt="What day of the week is today?"

SET $day_of_week$ = "$ASK1$"

IF $day_of_week$ = "Tuesday"

BEGINFIRSTSCREEN

Today is Tuesday. Your installation may proceed.

ENDFIRSTSCREEN

ELSE

EXITMESSAGE

Today is not Tuesday. This installation should be run only on a Tuesday.

EXIT

ENDIF

A text value corresponding to the day of the week had been set earlier in the script with the SETVARIABLE command, as shown. If the day of the week is correct, a short message appears. Otherwise, installation is aborted.

Example 2:

A numeric value can also be checked. If the text value contains all digits, it is assumed to be a number.

Thus

SET $A$="6"

IF $A$<"1234"

is true, because the number 6 is less than the number 1234, but

SET $A$="6a"

IF $A$<"1234"

is false, because 6 alphabetizes higher than 1.