diff --git a/client/installer.nsis b/client/installer.nsis index 304d38864..732932ac1 100644 --- a/client/installer.nsis +++ b/client/installer.nsis @@ -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