From 541b61bfac88131b8037244c005585c6f497b7e7 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 30 Jun 2017 08:54:56 +0200 Subject: [PATCH] fixes #29624 --- build/win32/code.iss | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/build/win32/code.iss b/build/win32/code.iss index e41068a44cd..2051718f9cf 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; -- GitLab