111,129
社区成员
发帖
与我相关
我的任务
分享
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();