mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-03 21:52:11 +08:00
fix(installer): prompt to terminate running instance before uninstall or overwrite (#8519)
* fix(installer): prompt to terminate running instance before uninstall or overwrite * fix(installer): detect running application instance during installation * docs(changelog): add changelog entry for windows installer fix Add release note entry for detecting running instances before reinstalling or overwriting in the Windows installer. Assisted-by: VSCode Copilot SDK (Gemini 3.8 Flash) Signed-off-by: ❤是纱雾酱哟~ <49941141+Dragon1573@users.noreply.github.com> --------- Signed-off-by: ❤是纱雾酱哟~ <49941141+Dragon1573@users.noreply.github.com>
This commit is contained in:
@@ -26,6 +26,10 @@
|
||||
|
||||
- 修复全局模式缺少 `GLOBAL` 策略组,无法单独选择全局出口
|
||||
|
||||
**🖥️ Windows**
|
||||
|
||||
- Windows:修复安装程序重新安装或覆盖时未提示退出运行中应用,导致卸载报错或覆盖失败的问题
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
@@ -21,6 +21,7 @@ ManifestDPIAwareness PerMonitorV2
|
||||
!include "FileAssociation.nsh"
|
||||
!include "Win\COM.nsh"
|
||||
!include "Win\Propkey.nsh"
|
||||
!include "Win\RestartManager.nsh"
|
||||
!include "WinVer.nsh"
|
||||
!include "LogicLib.nsh"
|
||||
!include "StrFunc.nsh"
|
||||
@@ -332,6 +333,8 @@ Function PageLeaveReinstall
|
||||
${EndIf}
|
||||
|
||||
reinst_uninstall:
|
||||
!insertmacro CheckIfAppIsRunning "$INSTDIR\${MAINBINARYNAME}.exe" "${PRODUCTNAME}"
|
||||
|
||||
HideWindow
|
||||
ClearErrors
|
||||
|
||||
@@ -368,7 +371,10 @@ Function PageLeaveReinstall
|
||||
MessageBox MB_ICONEXCLAMATION "$(unableToUninstall)"
|
||||
Abort
|
||||
${EndIf}
|
||||
Return
|
||||
|
||||
reinst_done:
|
||||
!insertmacro CheckIfAppIsRunning "$INSTDIR\${MAINBINARYNAME}.exe" "${PRODUCTNAME}"
|
||||
FunctionEnd
|
||||
|
||||
; 5. Choose install directory page
|
||||
@@ -901,8 +907,7 @@ Section Install
|
||||
|
||||
nsExec::Exec 'netsh int tcp res'
|
||||
|
||||
!include "Win\RestartManager.nsh"
|
||||
!insertmacro CheckIfAppIsRunning "${MAINBINARYNAME}.exe" "${PRODUCTNAME}"
|
||||
!insertmacro CheckIfAppIsRunning "$INSTDIR\${MAINBINARYNAME}.exe" "${PRODUCTNAME}"
|
||||
!insertmacro CheckAllVergeProcesses
|
||||
|
||||
; Ensure startup folders exist
|
||||
@@ -1101,7 +1106,7 @@ Section Uninstall
|
||||
!insertmacro NSIS_HOOK_PREUNINSTALL
|
||||
!endif
|
||||
|
||||
!insertmacro CheckIfAppIsRunning "${MAINBINARYNAME}.exe" "${PRODUCTNAME}"
|
||||
!insertmacro CheckIfAppIsRunning "$INSTDIR\${MAINBINARYNAME}.exe" "${PRODUCTNAME}"
|
||||
!insertmacro CheckAllVergeProcesses
|
||||
!insertmacro RemoveVergeService
|
||||
|
||||
|
||||
Reference in New Issue
Block a user