An installation can run in one of two modes: 32-bit or 64-bit. 64-bit install mode is selected if the user is running a 64-bit version of Windows and the system's processor architecture is included in the value of the ArchitecturesInstallIn64BitMode [Setup] section directive. Otherwise, 32-bit install mode is used.
How do the two modes of installation differ? Primarily, the differences lie in where things are installed by default.
In 32-bit install mode:
- The System32 path returned by the {sys} constant maps to the 32-bit System directory by default.
- The {commonpf} constant is equivalent to {commonpf32}.
- The {commoncf} constant is equivalent to {commoncf32}.
- [Registry] writes to the 32-bit view by default.
- The {reg:...} constant reads the 32-bit view by default.
- The Reg* [Code] support functions access the 32-bit view by default.
- The useapppaths flag of the [Icons] section reads the "App Paths" key in the 32-bit view of the registry.
- The regserver and regtypelib flags of the [Files] section load and register files inside a 32-bit process by default.
- The sharedfile flag of the [Files] section updates the "SharedDLLs" key in the 32-bit view of the registry by default.
- The Uninstall key is created in the 32-bit view of the registry.
In 64-bit install mode:
- The System32 path returned by the {sys} constant maps to the 64-bit System directory by default when used in the [Dirs], [Files], [InstallDelete], [Run], [UninstallDelete], and [UninstallRun] sections. This is because Setup/Uninstall 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.
- The {commonpf} constant is equivalent to {commonpf64}.
- The {commoncf} constant is equivalent to {commoncf64}.
- [Registry] writes to the 64-bit view by default.
- The {reg:...} constant reads the 64-bit view by default.
- The Reg* [Code] support functions access the 64-bit view by default.
- The useapppaths flag of the [Icons] section reads the "App Paths" key in the 64-bit view of the registry.
- The regserver and regtypelib flags of the [Files] section load and register files inside a 64-bit process by default.
- The sharedfile flag of the [Files] section updates the "SharedDLLs" key in the 64-bit view of the registry by default.
- The Uninstall key is created in the 64-bit view of the registry.