Search code examples
windowsregistry64-bitinno-setup

Inno Setup ignoring Registry Redirection?


I am running a setup on a 64-bit Windows 7 system. The script's (one that I've "inherited" and maintain these days) [Setup] section does not contain the ArchitecturesInstallIn64BitMode directive.

Per the docs:

  • [Registry] writes to the 32-bit view by default.
  • The Uninstall key is created in the 32-bit view of the registry.

This is my [Registry] section:

[Registry]
Root: HKCU; Subkey: "Software\{code:GetRegistryName}"; Flags: deletekey
Root: HKCU; Subkey: "Software\{code:GetRegistryName}"; Flags: uninsdeletekeyifempty
Root: HKCU; Subkey: "Software\{code:GetRegistryName}"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"; Flags: uninsdeletekey
Root: HKCU; Subkey: "Software\{code:GetRegistryName}"; ValueType: string; ValueName: "CurrentVersion"; ValueData: "{code:GetVersion}"; Flags: uninsdeletekey

...and yet, all of the keys land in the 64-bit part of the Registry - that is, nothing goes under Wow6432Node, as I would expect. Here is my Registry view (with some light editing):

enter image description here

and:

enter image description here

My issue here seems to be the opposite of every other one I've found on Stackoverflow, where one complains about "missing keys", that were in fact under Wow6432Node.


Solution

  • WOW64 registry redirection mostly applies to keys under HKLM and HKCR. Only COM related keys under HKCU\Software\Classes are redirected/reflected. See MSDN for details: Registry Keys Affected by WOW64.