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