mirror of https://github.com/laurent22/joplin.git
16 lines
1014 B
Diff
16 lines
1014 B
Diff
# This patch prevents the installer from considering itself as a running instance of Joplin.
|
|
# See https://github.com/laurent22/joplin/pull/11541
|
|
diff --git a/templates/nsis/include/allowOnlyOneInstallerInstance.nsh b/templates/nsis/include/allowOnlyOneInstallerInstance.nsh
|
|
index fe5d45c730f36c9fe8d8cfea12e242e501b67139..af2ce5c90ac910b079e24992519bffe33d57668a 100644
|
|
--- a/templates/nsis/include/allowOnlyOneInstallerInstance.nsh
|
|
+++ b/templates/nsis/include/allowOnlyOneInstallerInstance.nsh
|
|
@@ -42,7 +42,7 @@
|
|
${nsProcess::FindProcess} "${_FILE}" ${_ERR}
|
|
!else
|
|
# find process owned by current user
|
|
- nsExec::Exec `%SYSTEMROOT%\System32\cmd.exe /c tasklist /FI "USERNAME eq %USERNAME%" /FI "IMAGENAME eq ${_FILE}" /FO csv | %SYSTEMROOT%\System32\find.exe "${_FILE}"`
|
|
+ nsExec::Exec `%SYSTEMROOT%\System32\cmd.exe /c tasklist /FI "USERNAME eq %USERNAME%" /FI "PID ne $pid" /FI "IMAGENAME eq ${_FILE}" /FO csv | %SYSTEMROOT%\System32\find.exe "${_FILE}"`
|
|
Pop ${_ERR}
|
|
!endif
|
|
!macroend
|