From 96c3adaa197a6ffba644b46fef5ba072e553ea94 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 18 Jan 2016 16:15:31 -0800 Subject: [PATCH] use nsProcess to check if process is running --- cmake/templates/NSIS.template.in | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index 2a5618ce8a..c7d2f05fb5 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -984,21 +984,22 @@ Function HandlePostInstallOptions FunctionEnd +!include nsProcess.nsh !macro PromptForRunningApplication applicationName displayName - FindProcDLL::FindProc ${applicationName} + ${nsProcess::FindProcess} ${applicationName} $R0 - ${If} $R0 == 1 + ${If} $R0 == 0 MessageBox MB_OK|MB_ICONEXCLAMATION "The High Fidelity ${displayName} is running. Please close it first." /SD IDOK Abort ${EndIf} !macroend !macro CheckForRunningApplications - !insertmacro PromptForRunningApplication "$INSTDIR\@INTERFACE_WIN_EXEC_NAME@" "Client" - !insertmacro PromptForRunningApplication "$INSTDIR\@CONSOLE_WIN_EXEC_NAME@" "@CONSOLE_SHORTCUT_NAME@" - !insertmacro PromptForRunningApplication "$INSTDIR\@DS_EXEC_NAME@" "domain-server" - !insertmacro PromptForRunningApplication "$INSTDIR\@AC_EXEC_NAME@" "assignment-client" + !insertmacro PromptForRunningApplication "@INTERFACE_WIN_EXEC_NAME@" "Client" + !insertmacro PromptForRunningApplication "@CONSOLE_WIN_EXEC_NAME@" "@CONSOLE_SHORTCUT_NAME@" + !insertmacro PromptForRunningApplication "@DS_EXEC_NAME@" "domain-server" + !insertmacro PromptForRunningApplication "@AC_EXEC_NAME@" "assignment-client" !macroend ;--------------------------------