to open and read command prompt commands
i need open and read command prompt results programatically. For example -open command prompt and using the command 开发者_运维知识库ping -i need to read and store the result datas someone help me out with sample programs
System.Diagnostics.Process.Start
MSDN - System.Diagnostics.Process.Start
This is easier to accomplish with a batch script by redirecting the output to a file using '>'
For Example
ping www.google.com > foo.txt
Futher Reading: Command redirection operators
精彩评论