卸载前增加提示

This commit is contained in:
luoliangyi 2022-11-26 11:46:43 +08:00
parent ce77f377b3
commit 4bf728ece6
4 changed files with 32 additions and 20 deletions

View File

@ -181,6 +181,8 @@ begin
if 0 = ErrorCode then
begin
if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{ADE66CB2-15FD-4BF8-BFA7-ED3E239C9ACE}_is1', 'UninstallString', ResultStr) then
begin
if MsgBox('扫描软件已安装,是否卸载原版本?', mbConfirmation, MB_YESNO) = IDYES then
begin
ResultStr := RemoveQuotes(ResultStr);
if Exec(ResultStr, '/verysilent', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then
@ -192,6 +194,7 @@ begin
end
end
end
end
else
begin
Result := true;

View File

@ -238,6 +238,8 @@ begin
if 0 = ErrorCode then
begin
if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4486975C-CBCF-430B-BED1-427866D1738E}_is1', 'UninstallString', ResultStr) then
begin
if MsgBox('扫描软件已安装,是否卸载原版本?', mbConfirmation, MB_YESNO) = IDYES then
begin
ResultStr := RemoveQuotes(ResultStr);
if Exec(ResultStr, '/verysilent', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then
@ -249,6 +251,7 @@ begin
end
end
end
end
else
begin
Result := true;

View File

@ -230,6 +230,8 @@ begin
if 0 = ErrorCode then
begin
if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7076DC53-5C2F-4216-9783-2A6F954FEB3E}_is1', 'UninstallString', ResultStr) then
begin
if MsgBox('扫描软件已安装,是否卸载原版本?', mbConfirmation, MB_YESNO) = IDYES then
begin
ResultStr := RemoveQuotes(ResultStr);
if Exec(ResultStr, '/verysilent', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then
@ -241,6 +243,7 @@ begin
end
end
end
end
else
begin
Result := true;

View File

@ -178,6 +178,8 @@ begin
if 0 = ErrorCode then
begin
if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F2890F43-A51C-4379-BB79-992616B1D6BD}_is1', 'UninstallString', ResultStr) then
begin
if MsgBox('扫描软件已安装,是否卸载原版本?', mbConfirmation, MB_YESNO) = IDYES then
begin
ResultStr := RemoveQuotes(ResultStr);
if Exec(ResultStr, '/verysilent', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then
@ -189,6 +191,7 @@ begin
end
end
end
end
else
begin
Result := true;