According to MSDN, "The Kill
method executes asynchronously. After calling the Kill
method, call the WaitForExit
method to wait for the process to exit, or check the HasExited
property to determine if the process has exited."
In other words, just because Kill
returns doesn't mean the process is actually gone. You'll need to call WaitForExit
to wait until the process has actually disappeared.