0

Hi guys im trying to telnet to an IP address that is entered into a textbox from the click of a button but im having problems as it just gives me errors when i run it. Here is my code:

Private Sub btnTelnet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTelnet.Click

        Dim telnet As Process = New Process
        telnet.StartInfo.FileName = "telnet.exe"
        telnet.StartInfo.Arguments = "o" + txthostname.text
        telnet.StartInfo.WindowStyle = ProcessWindowStyle.Normal
        telnet.StartInfo.CreateNoWindow = True
        telnet.Start()
    End Sub

without the "telnet.StartInfo.Arguments = "o" + txthostname.text" command it just opens telnet but with the code it says "unexpected error continue or quit".

Any help would be great
Cheers

2
Contributors
1
Reply
3
Views
9 Years
Discussion Span
Last Post by kevinwebster83
0

Hi

What does the "o" argument do? I think the problem is to do with this argument, if you want telnet to just connect to a host then just pass the hostname.text as the argument without the "o"

Hope this helps

Kev

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.