Synchronous Process.Start

  • Thread starter Thread starter eggie5
  • Start date Start date
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();
}
 
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?

http://msdn2.microsoft.com/en-us/library/fb4aw7b8.aspx

For questions like this, it is often helpful to browse the "members" page
of the MSDN documentation for the class you're using. Often, you will
find exactly what you're looking all by yourself.

Pete
 

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

Back
Top