From 2f77ac47ead18dad361f45ef0724944e9732082d Mon Sep 17 00:00:00 2001 From: "Zane U. Ji" Date: Sat, 19 Apr 2014 20:07:16 +0800 Subject: [PATCH] Fixed registry path in 64-bit installation mode --- src/xmlcopyeditor.iss | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/xmlcopyeditor.iss b/src/xmlcopyeditor.iss index 6bc64dc..6fe98e2 100644 --- a/src/xmlcopyeditor.iss +++ b/src/xmlcopyeditor.iss @@ -158,8 +158,13 @@ var begin sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#MyAppName}_is1'); sUnInstallString := ''; - if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then - RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString); + if RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then + else if RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString) then + else if Is64BitInstallMode then begin + sUnInstPath := ExpandConstant('Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{#MyAppName}_is1'); + if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then + RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString); + end; Result := sUnInstallString; end;