Windows Installer Editor Reference
390
Using Conditions and Properties
z
When adding conditions to the Launch Conditions icon, you can add conditions that
check properties or environment variables, but you cannot add conditions that check
the installed state of a component or feature.
z
You might need to include the merge module CondFix.msm, that fixes certain
Windows Installer limitations related to component conditions.
See
WiseFixConditions
on page 390.
z
Property names and values, by default, are case-sensitive. To make them case-
insensitive, precede the operator with ~= instead of =.
Example: If you enter the condition REMOVE=ALL but the value of the REMOVE
property is currently “All” (with upper- and lowercase), the condition is false. To
write the condition so that it is case-insensitive, type the condition as follows:
REMOVE~=”All”
z
Environment variable names are not case-sensitive.
z
Non-existent property values are treated as empty strings and evaluate to false.
z
Operators and precedence are the same as in the BASIC and SQL languages, but
you can override precedence with parentheses.
z
Arithmetic operators and floating point numeric values are not supported.
For details, see Conditional Statement Syntax in the Windows Installer SDK Help.
Examples of Conditions
You can build conditions using property names, environment variables, and feature and
component states. Conditions can contain both Windows Installer properties and
properties that you create. A complete list of Windows Installer properties is available in
Property Reference in the Windows Installer SDK Help.
WiseFixConditions
Windows Installer Editor contains a special merge module, WiseFixConditions
(CondFix.msm), that fixes certain Windows Installer limitations:
Condition
The condition is true if
SystemLanguageID=1033
The installation is running on a computer whose
language is set to English.
REMOVE~=”ALL”
The product is being uninstalled. The ~ makes the
condition case-insensitive.
NOT Installed
The product is being installed for the first time.
CHECKBOX_IS_MARKED
You make a check box and associate the property
CHECKBOX_IS_MARKED with it, and during
installation, the end user marks the check box.
VersionNT
The installation is running on Windows 2000 or
later.
VersionNT AND NOT Installed
The installation is running on Windows 2000 or
later, and the application is not yet installed.