Windows Installer Editor Reference
120
Defining an Installation Project
features are listed in the Current Feature drop-down list, which appears on all
Installation Expert pages in the Feature Details page group. Just as you can specify
options on a per-feature basis, you can also specify options on a per-condition basis.
Options on these pages that you associate with a condition are installed only if the
condition is true and the feature is installed.
Example:
Suppose your core application files are stored in a feature named Application. If your
application is installed on Windows 95/98/Me, you want to also install Application9x.dll,
but if your application is installed on operating system later than Windows Me, you want
to install ApplicationNT.dll. You do not want to install both .DLLs, but instead want to
install one or the other based on the version of the operating system. To do this, you:
z
Add two conditions under the Web_Creator feature, Version9X (which specifies an
OS of Windows 95/98/Me) and VersionNT (which specifies an OS later than Windows
Me).
z
On the Files page, select the VersionNT condition from the Current Feature drop-
down list, then add the ApplicationNT.dll file.
z
On the Files page, select the Version9X condition from the Current Feature drop-
down list, then add the Application9x.dll file.
During installation, the files contained within the conditions are installed only if the
condition is true.
Version9X and VersionNT are properties that are set by Windows Installer. See
VersionNT Property and Version9X Property in the Windows Installer SDK Help.
See also:
WiseFixConditions
on page 440
Features Page
on page 110
Adding and Deleting Feature Conditions
on page 120
Adding and Deleting Feature Conditions
To add a new condition to a feature
1. Select Installation Expert > Features page.
2. Click a feature name.
3. Click Add Condition at the right of the Features page.
The Feature Condition dialog box appears.
4. Click Build, and create your condition on the Condition Builder dialog box.
The Condition Builder dialog box lets you construct a conditional expression and
check its syntax.
See
Creating Conditions With Condition Builder
on page 441.
Note
If you add a component condition that checks the installed state of a component or
feature, add the merge module CondFix.msm to the installation. This merge module
fixes a Windows Installer limitation.
See
WiseFixConditions
on page 440.