Fixed registry path in 64-bit installation mode

This commit is contained in:
Zane U. Ji 2014-04-19 20:07:16 +08:00
parent fe2cd0713b
commit 2f77ac47ea
1 changed files with 7 additions and 2 deletions

View File

@ -158,8 +158,13 @@ var
begin begin
sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#MyAppName}_is1'); sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#MyAppName}_is1');
sUnInstallString := ''; 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 if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then
RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString); RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString);
end;
Result := sUnInstallString; Result := sUnInstallString;
end; end;