我正在构建一个telnet到AIX并运行Commands的程序。我收到此错误
系统找不到指定的文件
我使用Windows 10,64位,并且已经安装了telnet。
我也试过tcpclient:Sending Commands to Telnet
它连接到服务器,但我收到了Garbled ......
这是我的代码:
Dim p_Test As New Process
p_Test.StartInfo.FileName = "C:\WINDOWS\system32\telnet.exe"
p_Test.StartInfo.Arguments = "server"
p_Test.StartInfo.UseShellExecute = False
p_Test.StartInfo.RedirectStandardInput = True
p_Test.StartInfo.RedirectStandardOutput = True
p_Test.StartInfo.RedirectStandardError = False
p_Test.StartInfo.CreateNoWindow = True
p_Test.Start()
p_Test.StandardInput.WriteLine("Login")
p_Test.StandardInput.WriteLine("Passowrd")
p_Test.StandardInput.WriteLine("Commands")
p_Test.StandardInput.WriteLine("exit")
Dim strRst As String = p_Test.StandardOutput.ReadToEnd()
p_Test.Close()