Paedow Paedow - 1 year ago 79
C# Question

How can I start a new Process and wait until it finishes?

I want to start a program with C# (could use

). Then my program should wait until the started program is closed, before it continues.

How do I do this?

Answer Source

After your Start() call, add: use Process.WaitForExit()

 var myProcess = new Process {StartInfo = new ProcessStartInfo(processPath)};
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download