0

I am building a program that telnet to AIX and run Commands. I get this error

The system cannot find the file specified

I use windows 10, 64 bit, and already installed telnet.

I also tried tcpclient: Sending Commands to Telnet

It connects to the server but I just receive Garbled...

Here is my code:

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()
braX
  • 11,506
  • 5
  • 20
  • 33
  • Possible duplicate of [Process.Start("telnet.exe") throws exception](https://stackoverflow.com/questions/1710938/process-starttelnet-exe-throws-exception) – MatSnow Dec 28 '17 at 14:42
  • Thank you for your reply I have tried : p_Test.StartInfo.FileName = "C:\windows\sysnative\telnet.exe" it haven't not throws exception, but not any output. – Derek Chung Dec 28 '17 at 15:36

0 Answers0