Results 1 to 3 of 3

Thread: [RESOLVED] [2oo3] getting application output

  1. #1

    Thread Starter
    Member frix199's Avatar
    Join Date
    Dec 2005
    Location
    Thessaloniki, Greece iamthebest: True
    Posts
    59

    Resolved [RESOLVED] [2oo3] getting application output

    hey there
    i have a problem getting the output of and app
    i mean, i want to run/execute a command, and get wat it returns.
    like,
    VB Code:
    1. Process.Start("net", "help")
    how can i get the help text it will return?

    thanks


    Human beings are a disease, a cancer of this planet, you are a plague, and we are the cure.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [2oo3] getting application output

    Just to be picky processes don't "return" text. The closest thing a process has to a return value is its exit code, which you cannot obtain until it has exited, which is how function return values work also.

    As for getting the output from a process, I suggest that you read the help topic for the ProcessStartInfo.RedirectStandardOutput property, which explains the process and provides a code example. Gigemboy has also provided a code example in the VB.NET CodeBank forum.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Member frix199's Avatar
    Join Date
    Dec 2005
    Location
    Thessaloniki, Greece iamthebest: True
    Posts
    59

    Re: [2oo3] getting application output

    thanks jmcilhinney u saved the day again
    -rated-

    cheers


    Human beings are a disease, a cancer of this planet, you are a plague, and we are the cure.

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