Selecting the Appropriate Type of Architecture Validation for Builds

InstallShield 2018

Project • The following project types support product configurations:

Basic MSI
Merge Module

As x64 Windows-based systems that do not have 32-bit Windows-on-Windows (WOW64) support become more common, you may want to perform architecture validation when building a release in InstallShield. Architecture validation enables you to detect potentially problematic cases in which your installation may try to install product files or use run-time binaries that may not match the architecture of a target system.

For example, if end users may run your installation on x64 Windows Server Core systems that do not have WOW64 support, architecture validation can help you identify any x86 product files or x86 custom action files in your installation; x86 binaries cannot be loaded on x64 target systems without WOW64 support.

In addition, if you are mixing x64 and x86 product files (or x64 and x86 custom actions) in a single project and generating separate x86 and x64 .msi packages, you can use architecture validation to identify any x64 product or custom action files in your x86 releases, since these files cannot be loaded on x86 target systems.

Architecture validation also enables you to generate pure x86 .msi packages that contain only x86 versions of the built-in InstallShield custom action DLLs, or pure x64 .msi packages that contain only x64 versions of the built-in InstallShield custom action DLLs. To enable this functionality, InstallShield uses two predefined path variables: ISRedistPlatformDependentFolder and ISRedistPlatformDependentExpressFolder. By default, the values of these path variables are subfolders that contain x86 versions of the InstallShield custom action DLLs; the subfolders are in the following directory: InstallShield Program Files Folder\Redist. InstallShield modifies the values of these path variables at build time if necessary to include the x64 versions (instead of the x86 versions) of the InstallShield custom action DLLs in releases; these files are in different subfolders in InstallShield Program Files Folder\Redist.

Overview of Architecture Validation

InstallShield offers the following levels of support for build-time architecture validation:

None—Bypass build-time architecture validation.
Lenient—This type of validation lets you build x86 and x64 .msi packages (as indicated by the Template Summary property), and mix x86 and x64 product files and custom action files in both of those types of packages.

At build time, the ISRedistPlatformDependentFolder and ISRedistPlatformDependentExpressFolder path variables point to the x86 locations that contain x86 InstallShield custom action DLLs. InstallShield includes these x86 custom action DLLs in the build if your project includes support that requires these custom actions.

Lenient validation does not trigger build errors if the architecture that the Template Summary property specifies does not match the architecture for one or more of the custom action files that are being included in the release.

Lenient validation does not trigger build warnings if the architecture that the Template Summary property specifies does not match the architecture for one or more of the product files that are being included in the release.

Lenient is the default option.

Strict—With this type of validation, InstallShield attempts to build a pure x86 or pure x64 .msi package, depending on whether the Template Summary property specifies Intel (for x86) or x64.

If the Template Summary property specifies Intel, the ISRedistPlatformDependentFolder and ISRedistPlatformDependentExpressFolder path variables point to the x86 locations that contain x86 InstallShield custom action DLLs. However, if the Template Summary property specifies x64 and you are using strict validation, these path variables point to the x64 locations that contain x64 InstallShield custom action DLLs. If your project includes support that requires any of these custom actions, InstallShield adds the appropriate x86 or x64 versions of the DLLs to the build.

Strict validation may trigger build errors if the architecture that the Template Summary property specifies does not match the architecture for one or more of the custom action files that are being included in the release. Thus, during build-time validation of an x86 package, InstallShield generates a build error for each x64 custom action file in the package. During build-time validation of an x64 package, InstallShield generates a build error for each x86 custom action file in the package.

Strict validation may trigger build warnings if the architecture that the Template Summary property specifies does not match the architecture for one or more of the product files that are being included in the release. Thus, during build-time validation of an x86 package, InstallShield generates a build warning for each x64 product file in the package. During build-time validation of an x64 package, InstallShield generates a build warning for each x86 product file in the package.

Tip • For information on the Template Summary property, see Using the Template Summary Property.

For additional tips on targeting 64-bit operating systems, see Targeting 64-Bit Operating Systems with Basic MSI and InstallScript MSI Installations.

Selecting the Type of Architecture Validation

InstallShield lets you specify which type of architecture validation you want to use for each product configuration that is defined in the Releases view of your project.

To select the type of architecture validation that you want InstallShield to perform at build time:

1. In the View List under Media, click Releases.
2. In the Releases explorer, select the product configuration that you want to configure.
3. On the General tab, in the Architecture Validation setting, select the appropriate option. Available options are:
None
Lenient
Strict

Troubleshooting Build Errors and Warnings for Strict Architecture Validation

If you are using strict architecture validation to build an .msi package that specifies x64 for the Template Summary property, InstallShield may generate errors and warnings such as the following ones at build time:

error -7319: 32-bit Standard DLL Custom Action MyCustomAction must not be included in a strict 64-bit package.

warning -7326: Including 32-bit PE file C:\SourceFiles\x86\Myx86File.exe in a strict 64-bit package.

In many cases, an x64 target system can run an x86 file. However, if the x64 system does not have WOW64 support, it may not be able to run an x86 file.

Depending on your requirements, you may want to replace the x86 file or custom action that is referenced in a build error or warning with an x64 file or custom action. In other scenarios, you may want to ignore a build error or warning. For example, if a file’s component has a condition that prevents the component from being installed on x64 systems, you may want to ignore its corresponding build warning. In some cases, you may decide to reexamine your requirements—that is, you may want to avoid supporting x64 target systems that do not have WOW64 support.

Similarly, you may encounter build errors and warnings if you are using strict architecture validation to build an x86 .msi package; for example:

error -7320: 64-bit Standard DLL Custom Action MyCustomAction must not be included in a strict 32-bit package.

warning -7327: Including 64-bit PE file C:\SourceFiles\x64\Myx64File.exe in a strict 32-bit package.

An x86 system cannot run any x64 files or custom actions. Depending on your requirements, you may choose to make changes to your project or ignore the build errors and warnings. In some cases, you may decide to reexamine your requirements.

See Also