日期:2014-05-17 浏览次数:22729 次
Process p = new Process();
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.Arguments = " /K";
//p.StartInfo.RedirectStandardOutput = true;
//p.StartInfo.RedirectStandardError = true;
p.Start();
p.StandardInput.WriteLine("telnet 192.168.0.1");
p.StandardInput.Close();
p.WaitForExit();
p.Close();