This article describes how to use Actual Installer to install 32-bit or 64-bit programs on 64-bit Windows operating systems.
Actual Installer creates 32-bit installation packages that can install both 32-bit and 64-bit applications.
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
"C:\Windows\System32" is for 64-bit files
"C:\Windows\SysWOW64" is for 32-bit files
"HKEY_LOCAL_MACHINE\SOFTWARE" is for 64-bit apps
"HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node" is for 32-bit apps
To access these 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 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
If you use full path "C:\Windows\System32" (no variables) for installing files in Windws\System folder on 64-bit Windows (and the option "64-bit only" is not selected ), it will automatically be redirected to "C:\Windows\SysWOW64", because of the Windows subsystem WoW64 (Windows 32-bit on Windows 64-bit). Please read more information at https://en.wikipedia.org/wiki/WoW64.
To access this 64-bit folder "C:\Windows\System32" from a 32-bit application, with the option "64-bit only" unselected, the following path should be used, instead of C:\Windows\System32:
or (using variable):
Also please note, that on 32-bit Windows access to this path will fail.
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 installation, you can use a variable <ProgramFiles64>.