From 8d6a1b45c4db8a43bbab443cc5babf726ccde1c1 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Mon, 9 May 2011 18:09:38 +0000 Subject: [PATCH] add check in Windows setup if software is already running --- windows/installer.nsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/windows/installer.nsi b/windows/installer.nsi index b954b432..57d16637 100755 --- a/windows/installer.nsi +++ b/windows/installer.nsi @@ -28,6 +28,13 @@ Page instfiles Section + ; check if software is currently running + FindProcDLL::FindProc "${APP_EXE}" + IntCmp $R0 1 0 notRunning + MessageBox MB_OK|MB_ICONEXCLAMATION "${APP_NAME} is running. Please close it and run the setup again." /SD IDOK + Abort + notRunning: + ; add reg keys so that software appears in Windows "Add/Remove Software" WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "${APP_NAME} (remove only)" WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" '"$INSTDIR\${UNINSTALL_EXE}"'