Synchronous Process.Start

E

eggie5

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();
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top