Archive: How to check if a process is still running?


How to check if a process is still running?
After I issue a NET STOP command using NET STOP my windows service might still be running for a few seconds (or longer) since it has to properly internally shut down.

Is there any way I can see if a particular process is still running and only continue once it shuts down?

ExecWait with NET STOP returns right away, even if the Windows service still continues running for a few more seconds.

I get around it by adding a Sleep 5000, but it's a fairly primitive hack...I'd like it to be a bit more polished and error proof.

Thank you.


You can use the FindProc plugin.