Specifying Component Installation Conditions

InstallShield 2022 » Globalization Tutorial » Step 6

Now that you have created your language-specific components, you need to include logic that will let the installer know which of these components should be installed. By specifying a component condition, you can determine the default language of the target system and then install the appropriate file. Each of the three language-specific components that you created will need a condition. If that condition evaluates to True, the component is installed.

To create the component condition:

1. Click the German_Readme component.
2. In the right pane, click the Condition setting, and then click the ellipsis button (...) for this setting. The Condition Builder dialog box opens.
3. In the Properties list, select SystemLanguageID, and then click the Add button.
4. In the Operators list, select the equals sign (=), and then click the Add button.

The Condition(s) box contains SystemLanguageID =, which reflects the selections you previously made.

5. Next you need to provide a value that will be checked when the installation is run. Because you are currently editing the German component, enter 1031 after the equal sign. 1031 is the language ID for German. Since the component is installed only if this equation evaluates to true (that is, the target system’s language is German), this component is not installed on any machine that is not running in German.

Follow the same steps from above to add a condition to the Polish_Readme component. Instead of using 1031 as the language value, use 1045, which is the language ID for Polish.

You need to choose one language as your default language. For this example, English is the default. Therefore, the condition that you use for the English_Readme component differs from the other two. The condition for the English_Readme component should appear as follows:

SystemLanguageID<>1045 AND SystemLanguageID<>1031

With this logic, if the language of the target machine is not German or Polish, the English_Readme component is installed.

Project:To learn how to specify which language-dependent components are installed at run time for InstallScript and InstallScript object projects, see Installing Components Based on Language.

Continue