Uninstall wasn't correctly check for running application: replace FindWindow by tasklist.

This commit is contained in:
Julien Wadel 2022-10-04 18:21:11 +02:00
parent 74a9766ed7
commit 0b0ba13382

View file

@ -1,6 +1,7 @@
FindWindow $0 "" "@APPLICATION_NAME@"
StrCmp $0 0 notRunningInUninstall
MessageBox MB_OK|MB_ICONEXCLAMATION "@APPLICATION_NAME@ is running. Please close it first from the application menu and restart the uninstall program." /SD IDOK
ClearErrors
ExecWait '"cmd" /C ""%SystemRoot%\System32\tasklist" /NH /FI "IMAGENAME eq @CPACK_NSIS_MUI_FINISHPAGE_RUN@" | "%SystemRoot%\System32\find" /I /C "@CPACK_NSIS_MUI_FINISHPAGE_RUN@""' $0
IntCmp $0 1 notRunningInUninstall
MessageBox MB_OK|MB_ICONEXCLAMATION "@CPACK_NSIS_MUI_FINISHPAGE_RUN@ is running. Please close it first from the application menu and restart the installation." /SD IDOK
Abort
notRunningInUninstall: