Challenges of Supporting Both 32-Bit and 64-Bit Target Operating Systems

InstallShield 2015 Express Edition

If you want your product to support both 32-bit and 64-bit target systems, note the following fundamental Windows Installer conflict when you are creating your product’s installation:

A 32-bit Windows Installer package cannot install to 64-bit file or registry locations.
A 64-bit Windows Installer package cannot run on 32-bit systems.

Windows Installer does not have support for creating a multi-architecture Windows Installer package that installs to 32-bit locations on 32-bit systems and 64-bit locations on 64-bit systems.

Key Differences Between 32-Bit and 64-Bit Support

32-Bit vs. 64-Bit Windows Installer Packages

A Windows Installer package is considered to be 32 bit if its Template Summary property indicates Intel; it is considered to be 64 bit if its Template Summary property indicates x64. A 32-bit Windows Installer package can run on 32-bit systems and on most 64-bit systems. However, a 64-bit Windows Installer package runs only on 64-bit systems. Running a 64-bit Windows Installer package on a 32-bit system results in run-time error 1633:

This installation package is not supported by this processor type. Contact your product vendor.

The Express edition of InstallShield configures the Template Summary property automatically.

32-Bit vs. 64-Bit Components

A component is the smallest installable part of a product. It contains files, registry entries, and other data to be installed on target systems. (For more information, see Installation Fundamentals.) The Express edition of InstallShield creates each component for a Windows Installer package automatically at build time, and marks each component as 64 bit if appropriate.

A 32-bit Windows Installer package cannot contain any 64-bit components, but a 64-bit Windows Installer package can contain 32-bit components, 64-bit components, or a mix of both.

In order for Windows Installer to install to a 64-bit location on a 64-bit system, the component in the 64-bit Windows Installer package that contains the data for the 64-bit location must be marked as 64 bit. If a component in a 64-bit Windows Installer package is not marked as 64 bit, its data is installed to 32-bit locations.

A 32-bit component in a 32-bit Windows Installer package installs to 32-bit locations on 32-bit and 64-bit systems. A 32-bit component in a 64-bit Windows Installer package installs to 32-bit locations on 64-bit systems.

32-Bit vs. 64-Bit File Locations

Microsoft designed 64-bit versions of Windows to allow existing 32-bit applications to continue to work seamlessly. They also designed 64-bit versions of Windows in such a way to allow a recompiled version of the same code to work seamlessly as a 64-bit application. To provide this support, 64-bit versions of Windows isolate the 32-bit and 64-bit files from each other by storing their files in separate locations.

A 64-bit target system typically has two Program Files folders:

Program Files, which is for 64-bit applications
Program Files (x86), which is for 32-bit applications

A 64-bit target system typically has two Common Files folders (one in either Program Files folder):

Program Files\Common Files, which is for 64-bit applications
Program Files (x86)\Common Files, which is for 32-bit applications

A 64-bit target system also typically has two system folders:

System32, which is for 64-bit libraries and executable files
SysWOW64, which is for 32-bit libraries and executable files

If a 32-bit Windows Installer package is configured to install a product’s files and folders to the Program Files folder, Windows Installer installs those files and folders in the Program Files folder on 32-bit systems. However, if end users run the 32-bit installation on 64-bit systems, Windows Installer installs the files and folders to the Program Files (x86) folder.

Similarly, if a 32-bit Windows Installer package is configured to install any of a product’s files and folders to the System32 folder, Windows Installer installs those files and folders to System32 on 32-bit systems and to SysWOW64 on 64-bit systems.

32-Bit vs. 64-Bit Registry Locations

The isolation of 32-bit and 64-bit data from each other on 64-bit systems also occurs in the registry. A 64-bit target system typically has two HKEY_LOCAL_MACHINE\Software keys:

HKLM\Software, which is for 64-bit applications
HKLM\Software\Wow6432Node, which is for 32-bit applications

If a 32-bit Windows Installer package is configured to install a product’s registry data under the HKLM\Software key, Windows Installer installs that data under the HKLM\Software key on 32-bit systems, but under HKLM\Software\Wow6432Node on 64-bit systems.

Tip: To see how a 32-bit application views the registry on a 64-bit system, launch the 32-bit version of the Registry Editor (the regedit.exe file in the SysWOW64 folder).

Deciding Between 32-Bit and 64-Bit Windows Installer Packages

Most installation authors choose to create 32-bit Windows Installer packages for all of their end users. Typically the 32-bit packages can be successfully run on their end users’ machines and their products run as designed, regardless of whether those end users have 32-bit or 64-bit versions of Windows.

If your product consists of 32-bit product files for 32-bit systems and equivalent 64-bit product files for 64-bit systems, you may want to create a 32-bit Windows Installer package for end users who install on 32-bit systems and a separate 64-bit Windows Installer package for end users who install on 64-bit systems.

If your product targets only end users who have 64-bit versions of Windows, you may prefer to create a 64-bit Windows Installer package instead of a 32-bit one.

32-Bit and 64-Bit Support in InstallShield

InstallShield includes support for creating the following types of installations:

A 32-bit Windows Installer package that installs to 32-bit file and registry locations.
A 64-bit Windows Installer package that installs to 64-bit file and registry locations. This type of package can also install to 32-bit file and registry locations.

How InstallShield Determines Whether to Build a 64-Bit or 32-Bit Windows Installer Package

If one or both of the following conditions are true at build time, InstallShield creates a 64-bit Windows Installer package (in which x64 is specified for the Template Summary property):

The Files view in the Express project contains one or more folders or files that are configured to be installed to CommonFiles64Folder, ProgramFiles64Folder, or System64Folder.
The Registry view in the Express project contains one or more registry entries under the HKEY_LOCAL_MACHINE\SOFTWARE (64-Bit) node.

In addition, when InstallShield builds a 64-bit Windows Installer package, it marks the components that contain the files, folders, and registry entries in 64-bit locations as 64 bit.

If neither of the aforementioned conditions is true, InstallShield creates a 32-bit Windows Installer package (in which Intel is specified for the Template Summary property). In addition, none of the components in the package are marked as 64 bit. In this type of scenario, all of the files, folders, and registry entries are installed to 32-bit locations, even on 64-bit target systems.

Edition: Note that some 64-bit target systems—such as Windows Server Core systems—may not have 32-bit Windows-on-Windows (WOW64) support. These 64-bit target systems cannot run 32-bit Windows Installer packages. The Premier and Professional editions of InstallShield include support for creating pure 64-bit Windows Installer packages that work on these systems.

Also note that the Premier and Professional editions of InstallShield include support for creating two Windows Installer packages (one 32 bit and one 64 bit) from a single project file, and for using release flags to include or exclude various parts of the project in each release at build time. If you want to create a 32-bit Windows Installer package and a 64-bit Windows Installer package in the Express edition of InstallShield, you must create two separate Express projects.

The Premier edition of InstallShield includes support for a Suite/Advanced UI installation that lets you simplify the distribution of a product’s installation, since it enables you to combine 64-bit and 32-bit Windows Installer packages into a single installation; the appropriate package is run on each target system at run time.

Including 64-Bit Merge Modules in Express Projects

InstallShield lets you add 64-bit merge modules to Express projects. If you add a 64-bit merge module that has one or more 64-bit components to an Express project, the Express project must have at least one file, folder, or registry entry that is configured to be installed to a 64-bit location; otherwise, the following error occurs at build time:

error -5008: This 32-bit package cannot include 64-bit data. The 64-bit data may come from a merge module.

If the Express project does not have at least one file, folder, or registry entry that is configured to be installed to a 64-bit location, InstallShield attempts to create a 32-bit Windows Installer package at build time; however, a 32-bit Windows Installer package cannot contain a 64-bit merge module that contains one or more 64-bit components.

See Also