From 6f3cd83981a086eb981a9e9b8f6165b1a1e32779 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Tue, 3 Dec 2024 18:39:07 +0100 Subject: [PATCH] Installation: Retry option on running application. --- cmake/install/windows/NSIS.template.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/install/windows/NSIS.template.in b/cmake/install/windows/NSIS.template.in index 3602027a7..f22622477 100644 --- a/cmake/install/windows/NSIS.template.in +++ b/cmake/install/windows/NSIS.template.in @@ -964,10 +964,11 @@ SectionEnd Function .onInit + retry: 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 notRunning - 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 + MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "@CPACK_NSIS_MUI_FINISHPAGE_RUN@ is running. Please close it first from the application menu and restart the installation." /SD IDCANCEL IDRETRY retry Abort notRunning: