views:

754

answers:

2

We have a web application that has to launch other processes. Typically these processes are batch files that launch a series of other processes. Sometimes we need to kill a batch file process that is running and to do that we need to kill it and its children.

What is the best way to go about this in .Net?

+1  A: 

On an earlier occasion, process-tree question, the SO community did not vote up any answer. Good luck this time!

gimel
Ha! I'll cross my fingers
Jeffrey Cameron
Your fingers did the trick!
gimel
+1  A: 

For me this solution works well.

(It is only applicable to Windows environment: P/Invoke is used to call unmanaged APIs)

vpolozov
Works like a charm, thanks!
Jeffrey Cameron