How do I set conditions on features or components that only install on Windows NT, 2000, and XP systems?
When developing your installation, you may want to install operating-system specific files. To do this, set up component or feature conditions for the desired set of operating-system specific files or registry keys. This article provides step-by-step examples which demonstrate how to set conditions on features and how to set conditions on components to install VersionNT files. Choose the option that works best for your installation.
To set conditions on features, complete the following steps:
- Open Wise for Windows Installer, Wise for Visual Studio .NET, or Windows Installer Editor in Wise Package Studio.
- Click the Installation Expert tab then click the Features link in the Project Definition page group.
- Click the Add Condition button. The Feature Condition dialog opens.
- In the Condition field, enter VersionNT and click OK.
- Add the specific files or registry under this feature/condition set.
To set conditions on components:
- Click the Setup Editor tab and select the Component tab.
- Right-click on the component that contains the operating-system specific file or registry and select Details. The Component Details dialog appears.
- Enter "VersionNT" in the Condition field and click OK.
At runtime, the features or components that have the VersionNT as the condition install on only Windows NT, Windows 2000, or Windows XP operating systems. These same features and components do not install on Windows 95, 98, or Millennium Edition (ME).
Note: For more information on the Version9x and VersionNT properties set by Windows Installer, please see the topics titled "VersionNT Property" and "Version9x Property" in the Windows Installer SDK.
In addition, if you need to identify a specific operating system, then see "Operating System Property Values" in the Windows Installer SDK. Examples of this would be the following:
Windows 2000 SP1: VersionNT= 500 AND WindowsBuild=2195 AND
Windows XP SP2: VersionNT=501 AND WindowsBuild=2600 AND ServicePackLevel=2