recieving output from dos
-
how can i run a process from my program and get it's output? as in running "ipconfig" and getting what was written in the dos window?
-
how can i run a process from my program and get it's output? as in running "ipconfig" and getting what was written in the dos window?
-
how can i run a process from my program and get it's output? as in running "ipconfig" and getting what was written in the dos window?
If you need something more interactive,
the System.Diagnostics.Process
class allows you to replace the default input and output streams that goto the application. In theory (I've never tried) this would allow you to fully automate any command line app by analyzing screen scrapings to feed it new input.-- CleaKO The sad part about this instance is that none of the users ever said anything [about the problem]. Pete O`Hanlon Doesn't that just tell you everything you need to know about users?
-
how can i run a process from my program and get it's output? as in running "ipconfig" and getting what was written in the dos window?
Process.StandardOutput Property[^] Take a look at the first example. It shows how to read from a redirected stream and wait for the child process to exit.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook