[client] Stop the service and UI before the NSIS installer extracts files (#8255)

This commit is contained in:
Bruno Mercier Costa
2026-10-21 20:37:48 +02:00
committed by GitHub
parent 73829c8d96
commit b03d1c7d07
+9
View File
@@ -198,6 +198,15 @@ FunctionEnd
######################################################################
Section -MainProgram
${INSTALL_TYPE}
; The previous uninstaller stops the service and the UI only when its uninstall key
; is found and endpoint protection lets the unsigned uninstaller run. Extraction
; fails on any exe that is still running.
DetailPrint "Stopping Netbird service..."
ExecWait '"$INSTDIR\${MAIN_APP_EXE}" service stop'
DetailPrint "Terminating ${UI_APP_NAME} process..."
ExecWait '"$SYSDIR\taskkill.exe" /im ${UI_APP_EXE}.exe /f'
; Both return before the processes release their image files.
Sleep 3000
# SetOverwrite ifnewer
SetOutPath "$INSTDIR"
!ifndef ARCH