fix(update): launch installers after the current app exits

This commit is contained in:
Sucukdeluxe
2026-08-21 02:35:53 +02:00
parent da4b6f295c
commit ce75012110
10 changed files with 203 additions and 27 deletions
+30
View File
@@ -0,0 +1,30 @@
!macro customCheckAppRunning
!insertmacro FIND_PROCESS "${APP_EXECUTABLE_FILENAME}" $R0
${if} $R0 == 0
${if} ${isUpdated}
StrCpy $R1 0
update_wait:
!insertmacro FIND_PROCESS "${APP_EXECUTABLE_FILENAME}" $R0
${if} $R0 != 0
Goto update_ready
${endif}
IntOp $R1 $R1 + 1
${if} $R1 >= 40
nsExec::Exec `"$SYSDIR\cmd.exe" /c taskkill /f /im "${APP_EXECUTABLE_FILENAME}" /fi "USERNAME eq %USERNAME%"`
Pop $R0
Sleep 500
Goto update_ready
${endif}
Sleep 200
Goto update_wait
update_ready:
${else}
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "$(appRunning)" /SD IDCANCEL IDOK manual_stop
Quit
manual_stop:
nsExec::Exec `"$SYSDIR\cmd.exe" /c taskkill /im "${APP_EXECUTABLE_FILENAME}" /fi "USERNAME eq %USERNAME%"`
Pop $R0
Sleep 500
${endif}
${endif}
!macroend