Wait until a process ends in C#
To wait until external process ends we can useWaitForExit()
method which makes the current thread wait until the associated process terminates. It should be called after all other methods are called on the process. var process = Process.Start(...);
process.WaitForExit();