From 4bf728ece6c895c97ef237e651df107af1190287 Mon Sep 17 00:00:00 2001 From: luoliangyi <87842688@qq.com> Date: Sat, 26 Nov 2022 11:46:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=B8=E8=BD=BD=E5=89=8D=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- win/setup/scanner/CumtennScan_App_Setup.iss | 13 ++++++++----- win/setup/scanner/HanvonScan_App_Setup.iss | 13 ++++++++----- win/setup/scanner/HuaGoScan_App_Setup.iss | 13 ++++++++----- win/setup/scanner/LanxumScan_App_Setup.iss | 13 ++++++++----- 4 files changed, 32 insertions(+), 20 deletions(-) diff --git a/win/setup/scanner/CumtennScan_App_Setup.iss b/win/setup/scanner/CumtennScan_App_Setup.iss index e338846..8eb600c 100644 --- a/win/setup/scanner/CumtennScan_App_Setup.iss +++ b/win/setup/scanner/CumtennScan_App_Setup.iss @@ -182,13 +182,16 @@ begin begin if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{ADE66CB2-15FD-4BF8-BFA7-ED3E239C9ACE}_is1', 'UninstallString', ResultStr) then begin - ResultStr := RemoveQuotes(ResultStr); - if Exec(ResultStr, '/verysilent', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then + if MsgBox('扫描软件已安装,是否卸载原版本?', mbConfirmation, MB_YESNO) = IDYES then begin - if 0 = ResultCode then + ResultStr := RemoveQuotes(ResultStr); + if Exec(ResultStr, '/verysilent', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then begin - Sleep(1000) - Result := true; + if 0 = ResultCode then + begin + Sleep(1000) + Result := true; + end end end end diff --git a/win/setup/scanner/HanvonScan_App_Setup.iss b/win/setup/scanner/HanvonScan_App_Setup.iss index 6621b7a..ec8880a 100644 --- a/win/setup/scanner/HanvonScan_App_Setup.iss +++ b/win/setup/scanner/HanvonScan_App_Setup.iss @@ -239,13 +239,16 @@ begin begin if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4486975C-CBCF-430B-BED1-427866D1738E}_is1', 'UninstallString', ResultStr) then begin - ResultStr := RemoveQuotes(ResultStr); - if Exec(ResultStr, '/verysilent', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then + if MsgBox('扫描软件已安装,是否卸载原版本?', mbConfirmation, MB_YESNO) = IDYES then begin - if 0 = ResultCode then + ResultStr := RemoveQuotes(ResultStr); + if Exec(ResultStr, '/verysilent', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then begin - Sleep(1000) - Result := true; + if 0 = ResultCode then + begin + Sleep(1000) + Result := true; + end end end end diff --git a/win/setup/scanner/HuaGoScan_App_Setup.iss b/win/setup/scanner/HuaGoScan_App_Setup.iss index cd091d5..b178cad 100644 --- a/win/setup/scanner/HuaGoScan_App_Setup.iss +++ b/win/setup/scanner/HuaGoScan_App_Setup.iss @@ -231,13 +231,16 @@ begin begin if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7076DC53-5C2F-4216-9783-2A6F954FEB3E}_is1', 'UninstallString', ResultStr) then begin - ResultStr := RemoveQuotes(ResultStr); - if Exec(ResultStr, '/verysilent', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then + if MsgBox('扫描软件已安装,是否卸载原版本?', mbConfirmation, MB_YESNO) = IDYES then begin - if 0 = ResultCode then + ResultStr := RemoveQuotes(ResultStr); + if Exec(ResultStr, '/verysilent', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then begin - Sleep(1000) - Result := true; + if 0 = ResultCode then + begin + Sleep(1000) + Result := true; + end end end end diff --git a/win/setup/scanner/LanxumScan_App_Setup.iss b/win/setup/scanner/LanxumScan_App_Setup.iss index 5a99b2b..aade376 100644 --- a/win/setup/scanner/LanxumScan_App_Setup.iss +++ b/win/setup/scanner/LanxumScan_App_Setup.iss @@ -179,13 +179,16 @@ begin begin if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F2890F43-A51C-4379-BB79-992616B1D6BD}_is1', 'UninstallString', ResultStr) then begin - ResultStr := RemoveQuotes(ResultStr); - if Exec(ResultStr, '/verysilent', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then + if MsgBox('扫描软件已安装,是否卸载原版本?', mbConfirmation, MB_YESNO) = IDYES then begin - if 0 = ResultCode then + ResultStr := RemoveQuotes(ResultStr); + if Exec(ResultStr, '/verysilent', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then begin - Sleep(1000) - Result := true; + if 0 = ResultCode then + begin + Sleep(1000) + Result := true; + end end end end