Process.Start
-
Currently, this code will return immediately after the process is started. How can I modify it so that it will not return until the process has stopped? using (Process process = new Process()) { process.StartInfo.FileName = @"C:\myprocess.exe"; process.StartInfo.Arguments = String.Format("-j {0}", path); process.Start(); }
/\ |_ E X E GG
-
Currently, this code will return immediately after the process is started. How can I modify it so that it will not return until the process has stopped? using (Process process = new Process()) { process.StartInfo.FileName = @"C:\myprocess.exe"; process.StartInfo.Arguments = String.Format("-j {0}", path); process.Start(); }
/\ |_ E X E GG
eggie5 wrote:
Currently, this code will return immediately after the process is started. How can I modify it so that it will not return until the process has stopped?
process.Start();
process.WaitForExit();Share and enjoy. Sean