diff --git a/build/win32/code.iss b/build/win32/code.iss index e41068a44cda4950bb8c2fd1711e728ec361d401..2051718f9cf1e186277e03b71954c3da06a86866 100644 --- a/build/win32/code.iss +++ b/build/win32/code.iss @@ -800,20 +800,23 @@ var AltArch: String; begin Result := True; - RegKey := 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + copy('{#IncompatibleAppId}', 2, 38) + '_is1'; - - if '{#Arch}' = 'ia32' then begin - Result := not RegKeyExists(HKLM64, RegKey); - ThisArch := '32'; - AltArch := '64'; - end else begin - Result := not RegKeyExists(HKLM32, RegKey); - ThisArch := '64'; - AltArch := '32'; - end; - if not Result then begin - MsgBox('Please uninstall {#NameShort} ' + AltArch + 'bits before installing this ' + ThisArch + 'bits version.', mbInformation, MB_OK); + if IsWin64 then begin + RegKey := 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + copy('{#IncompatibleAppId}', 2, 38) + '_is1'; + + if '{#Arch}' = 'ia32' then begin + Result := not RegKeyExists(HKLM64, RegKey); + ThisArch := '32'; + AltArch := '64'; + end else begin + Result := not RegKeyExists(HKLM32, RegKey); + ThisArch := '64'; + AltArch := '32'; + end; + + if not Result then begin + MsgBox('Please uninstall {#NameShort} ' + AltArch + 'bits before installing this ' + ThisArch + 'bits version.', mbInformation, MB_OK); + end; end; end;