I want to restart a program.
I've found the process and have called Kill method, then i've runned it again:
process.Kill();
process.Start();
It stops but doesn't start.
Also if I put Exited event it never fires.
What's the problem?
Process.Kill()
is asynchronous. You need to call Process.WaitForExit()
after calling kill.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With