Step 4: Conditions and Properties

InstallShield 2022 » InstallScript Project Tutorial

In this step, you will learn how to conditionally install data on a target system.

A common requirement for installations is to install certain files on a system only if particular conditions are met. For example, files may be specific to an operating system or language, or should be installed only if the user has appropriate privileges.

To install a component (and its files and other data) only on particular operating systems, you can use the component’s Operating Systems property. You can modify a component’s properties by opening the Setup Design view, expanding the feature icon that contains the feature, and selecting the desired component.

To create a component that will be installed only on systems that have Windows 8:

1. Go to the Setup Design view.
2. Right-click the HelpFiles feature and select New Component.
3. Rename the component to windows_8_files.
4. Click the Files icon for the component and add the file ReadmeNT.txt from your source folder by right-clicking in the Files pane and browsing to the file.
5. Click the windows_8_files component to display the component’s property grid.
6. Select the component’s Operating Systems setting and click the browse button. The Platforms dialog opens.
7. Select the Windows 8 check box.
8. Click OK.

After you rebuild (by pressing F7) and run the installation (by pressing CTRL+F5), and any files or other data contained in the component will be installed only if the target system is running Windows 8.

The next step of the tutorial describes how to modify your project’s script.

See Also