System.Diagnostics.Process.Start async callback?

  • Thread starter Thread starter Twistfactory
  • Start date Start date
T

Twistfactory

Hi all,

Is there some way to execute an external process that will execute
asynchronously and then notify me when it's completed? Any sort of a
callback or class member that I could check periodically to see if
it's still running would work. The reason for this is that the
external process will be reading from a file that needs to be re-
written after each iteration. Thanks!
 
You can always set the EnableRaisingEvents property on the Process
instance to true, and then subscribe to the Exited event.
 
Works perfectly, thanks!

You can always set the EnableRaisingEvents property on the Process
instance to true, and then subscribe to the Exited event.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


Is there some way to execute an external process that will execute
asynchronously and then notify me when it's completed? Any sort of a
callback or class member that I could check periodically to see if
it's still running would work. The reason for this is that the
external process will be reading from a file that needs to be re-
written after each iteration. Thanks!
 

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