Results 1 to 4 of 4

Thread: [RESOLVED] [2008] Displaying what a program outputs

  1. #1

    Thread Starter
    PowerPoster formlesstree4's Avatar
    Join Date
    Jun 2008
    Posts
    3,250

    Resolved [RESOLVED] [2008] Displaying what a program outputs

    There is a command line program that I asked about how to make it execute stuff through vb.net

    Well, this same program spits out text on the cmd prompt it is executed on. Is there a way vb.net can capture this text and display it?

    Here's a simpler way to ask this. This program will show its results in a command prompt, but the command prompt disappears when it is done. Is there a way vb.net can get the text it shows before it disappears and write it to a text file?


  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: [2008] Displaying what a program outputs

    If you are starting the process, you can redirect the standard output to a stream and then capture that stream.


    Look into the ProcessStartInfo object to enable redirection.

  3. #3
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [2008] Displaying what a program outputs

    you can redirect the output from a command line program using VB.NET.

    Here is a sample article

    http://www.devx.com/dotnet/Article/7914/0/page/5

  4. #4

    Thread Starter
    PowerPoster formlesstree4's Avatar
    Join Date
    Jun 2008
    Posts
    3,250

    Re: [2008] Displaying what a program outputs

    Thanks guys, I figured it out

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