File/DLL installed to {sys} does not appear in C:\Windows\system32

By default the {sys} (system32) is redirected to {win}\SysWOW64 by the OS for 32-bit applications (like Inno Setup).

If your DLL (or rather the application) is 32-bit, you actually want the redirection. The SysWOW64 is the System32 equivalent for Windows 32-bit emulation on Windows 64-bit. See also Inno Setup install to SysWOW64 in 32Bit mode.


If you do not want the redirection (because your DLL/application is 64-bit), you can override the redirect using the 64bit flag:

Source: "..."; DestDir: "{sys}"; Flags: 64bit 

64bit: Causes the {sys} constant to map to the 64-bit System directory when used in the Source and DestDir parameters, …. This is the default behavior in a 64-bit mode install.


Or enable 64-bit mode install.

[Setup]
ArchitecturesInstallIn64BitMode=x64 ia64

In 64-bit 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.

Leave a Comment