Actual Installer
software installer

How to install 32-bit or 64-bit applications on 64-bit Windows

Back

This article describes how to use Actual Installer to install 32-bit or 64-bit programs on 64-bit Windows operating systems.

Actual Installer generates 32-bit installation packages that can install both 32-bit and 64-bit applications.

As you know, on 64-bit Windows there are two variants of system folders and registry keys:
Program Files directory:
"C:\Program Files" is for 64-bit apps
"C:\Program Files (x86)" is for 32-bit apps

System directory:
"C:\Windows\System32" is for 64-bit files
"C:\Windows\SysWOW64" is for 32-bit files

Registry Key:
"HKEY_LOCAL_MACHINE\SOFTWARE" is used by 64-bit apps
"HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node" is used by 32-bit apps

To access that paths in Actual Installer use variables <ProgramFiles> and <SystemDir>, which will contain the appropriate paths, depending on the bitness of Windows and the option Required OS - 64-bit only (on the General \ Requirements page).

So if your application is 64-bit, then all you have to do in the Actual Installer project is to select the 64-bit only option.
In this case these variables return:
<ProgramFiles> - C:\Program Files
<SystemDir> - C:\Windows\System32
The registry key HKEY_LOCAL_MACHINE\Software will also direct to the correct 64-bit key

If the 64-bit only option is NOT selected, then:
<ProgramFiles> - C:\Program Files (x86)
<SystemDir> - C:\Windows\SysWOW64
HKEY_LOCAL_MACHINE\SOFTWARE will direct to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node


NOTE:
If you use full path "C:\Windows\System32" (no variables) for installing files in this folder on 64-bit Windows, it will automatically be redirected to "C:\Windows\SysWOW64", because of the Windows subsystem WoW64 (Windows 32-bit on Windows 64-bit). More information about this system is described here.
To access this 64-bit folder "C:\Windows\System32" from a 32-bit application, without selecting the option "64-bit only", the following path should be used, instead of C:\Windows\System32:
C:\Windows\sysnative
or (using variable):
<WindowsDir>\sysnative

The same effect takes place when accessing the registry key "HKEY_LOCAL_MACHINE\SOFTWARE". WOW64 will redirect it to "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node".
But Actual Installer can handle this - there is an option Registry Bitness when adding a registry entry (page System \ Registry).

To access a 64-bit folder "C:\Program Files" from a 32-bit application, you just can use a variable <ProgramFiles64>.