Old 9th February 2011, 15:06   #1
Senior Member
Join Date: Jan 2004
Posts: 197
Send a message via AIM to jweinraub
Exclamation Find and possibly kill process


I am making an installer where it has quite a few executables in it. I want a good way to determine if any of them are running before the installer goes on.

the logic i am using is stupid i think and there must be a better way.

If it finds any of the running processes, i want an error to display and possibly offer the installer to kill it.

FindProcDLL::FindProc "foo1.exe"
${If} $R0 == 1
$err1 = "foo1.EXE"
$err1 = ""

FindProcDLL::FindProc "foo2.exe"
${If} $R0 == 1
$err2 = "foo2.EXE"
$err2 = ""

FindProcDLL::FindProc "foo3.exe"
${If} $R0 == 1
$err3 = "foo3.EXE"
$err3 = ""

; // snip, for two more programs

I was thinking of doing some string length foo here and then concatenate the error messages, separated by new lines
and add a messagebox mb_retrycancel|mb_iconexclamation "the foo installer cannot continue until the following are closed: $\r$\n $errorList" /SD IDCANCEL

and loop back up for the retry, or perhaps add a kill option so it kills and tries again before continuing.

I am really stuck here, been fiddling with this for a few days now.

Any help is greatly appreciated.

Thank you so so so so much!
jweinraub is offline   Reply With Quote
Old 9th February 2011, 22:23   #2
Major Dude
Join Date: Feb 2007
Posts: 672
jpderuiter is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

kill find process

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump