System.Diagnostics.Process.Start async callback?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Twistfactory@gmail.com

    #1

    System.Diagnostics.Process.Start async callback?

    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!

  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: System.Diagnost ics.Process.Sta rt async callback?

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

    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m


    <Twistfactory@g mail.comwrote in message
    news:1188921895 .071033.33290@w 3g2000hsg.googl egroups.com...
    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!
    >

    Comment

    • Twistfactory@gmail.com

      #3
      Re: System.Diagnost ics.Process.Sta rt async callback?

      Works perfectly, thanks!

      On Sep 4, 11:20 am, "Nicholas Paldino [.NET/C# MVP]"
      <m...@spam.guar d.caspershouse. comwrote:
      You can always set the EnableRaisingEv ents property on the Process
      instance to true, and then subscribe to the Exited event.
      >
      --
      - Nicholas Paldino [.NET/C# MVP]
      - m...@spam.guard .caspershouse.c om
      >
      <Twistfact...@g mail.comwrote in message
      >
      news:1188921895 .071033.33290@w 3g2000hsg.googl egroups.com...
      >
      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!

      Comment

      Working...