Use NsProcess plugin. FindProcDLL does not work properly on Windows Server 2008.
!include nsProcess.nsh
...
Section -Main SEC0000
...
App_Running_Check:
; is app.exe process running? result is stored in $R0
${nsProcess::FindProcess} "app.exe" $R0
${If} $R0 == 0
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "Please stop App.exe before continuing" /SD IDCANCEL IDRETRY App_Running_Check
Quit
${EndIf}
SectionEnd
...
Section -Main SEC0000
...
App_Running_Check:
; is app.exe process running? result is stored in $R0
${nsProcess::FindProcess} "app.exe" $R0
${If} $R0 == 0
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "Please stop App.exe before continuing" /SD IDCANCEL IDRETRY App_Running_Check
Quit
${EndIf}
SectionEnd
1 comment:
thank you, this is so much help...
Post a Comment