64-bit Installation Limitations
Because Inno Setup is a 32-bit application, there are some limitations to be aware of when utilizing its 64-bit installation features:
- The System32 path returned by the {sys} constant does not always map to the 64-bit System directory. When Setup/Uninstall is running in 64-bit mode, it maps to the 64-bit System directory when used in the [Dirs], [Files], [InstallDelete], [Run], [UninstallDelete], and [UninstallRun] sections because Setup temporarily disables WOW64 file system redirection when files/directories are accessed by those sections. Elsewhere, System32 and {sys} map to the 32-bit System directory, as is normal in a 32-bit process.
-
In the [Code] section, when Setup/Uninstall is running in 64-bit mode, functions that access files disable WOW64 file system redirection (unless overridden by a call to EnableFsRedirection). However, there are exceptions, listed below. These functions never disable file system redirection, meaning you cannot pass them (or get back) the name of a file located in the 64-bit System directory:
*Ini* (all of the functions that manipulate .INI files) BrowseForFolder CreateShellLink GetOpenFileName LoadDLL (see following point) ModifyPifFile SetCurrentDir ShellExec (use Exec instead) UnregisterFont Additionally, no VCL classes are capable of disabling file system redirection. For example, you cannot call the LoadFromFile method of TBitmap to load a bitmap file from the 64-bit System directory.
- You cannot load/use 64-bit DLLs in the [Code] section, because Windows does not allow 32-bit processes to load 64-bit DLLs (and vice versa). A 32-bit process can, however, launch 64-bit EXEs. Use the Exec function or the [Run] section to do that.