Results 1 to 4 of 4

Thread: Capture output of running command window?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Posts
    164

    Capture output of running command window?

    Hey all,

    I know how to launch an .exe or other executable, etc. But is there a way that I can actively read each line in that command window?

    Meaning I run a command window/line program from within my program. This 2nd programming is constantly running and displaying a few lines of output per every few seconds, etc. (with pauses in there, etc.)

    Then if I could get those lines, then I could parse it and then do functionA, functionB, start anothe process here or there, etc. I know how to do the parsing and stuff, I just don't know how to actively keep getting the data from the command window, etc.

    thanks,
    -Shurijo

  2. #2
    Registered User
    Join Date
    Nov 2002
    Location
    Växjö, Sweden
    Posts
    314
    If you are the one developing the console application as well, you can always use .NET Remoting to have the application send messages to the other application as well as writing console lines instead of reading those lines.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Posts
    164
    The console application is being developed by another party and I won't have access to the code or anything.
    -Shurijo

  4. #4
    Hyperactive Member
    Join Date
    Feb 2002
    Posts
    261
    Look into the 'Process' object.

    It has, among many other interesting things, properties that return the input, output, and error streams from other applications.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width