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,
how can i get the help text it will return?VB Code:
Process.Start("net", "help")
thanks
Printable View
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,
how can i get the help text it will return?VB Code:
Process.Start("net", "help")
thanks
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.
thanks jmcilhinney u saved the day again ;)
-rated-
cheers