内部启动进程
Process p = new Process();
p.StartInfo.FileName = "cmd ";
p.StartInfo.Arguments = "/C ping 127.0.0.1 ";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
//p.StandardInput.WriteLine("ping "+strIp);
//
//p.StandardInput.WriteLine("exit");
string strRst = p.StandardOutput.ReadToEnd();
Console.WriteLine(strRst);
p.Close();
Console.Read();