Automate Telnet with VB

Posted on 2002-06-07
Last Modified: 2013-11-13
I wish to create a Telnet session with VB, be able to read information received, and send commands.  

I am currently doing this through a thrid-party software package from FTP Software.  This works fine, however, it does require overhead (installation and licensing requirements, etc).  I have modified my code to utilize the wininet dll functionality for FTP, but unfortunately it does not appear that Telnet functionality is included in this DLL.  

Does anyone have any experience using standard Windows components to provide this functionality in Visual Basic?  I have done a bit of research, and it does appear that I may be able to use a third-party package which doesn't require licensing (Expect for Windows, or PHP), but I really want to do this as cleanly as possible.

Thanks in Advance,

Question by:mjs082969
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2

Author Comment

ID: 7061877
Clarification:  In my initial post, I stated "I have modified my code to utilize the wininet dll functionality for FTP"; I do not mean the forementioned FTP (FTP Software), but rather the standard file transfer protocol/utility.
LVL 43

Expert Comment

ID: 7061899

Is a sample application written in VB which will allow you to run a telnet session to any telnet server.

Author Comment

ID: 7062077
I forgot to mention something significant.  This tool I am creating provides functionality to automate processes; so there is no GUI.  Is there any way I can I still use the WinSock control, as used in the example mentioned by Tim above, to do this?
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 43

Accepted Solution

TimCottee earned 100 total points
ID: 7062116
You don't have to show the form for a start and you could easily send your commands directly to the function that processes them without having to type it into the form.

Author Comment

ID: 7104875
By the way, the application listed above (TELNET.ZIP)doesn't work.

Author Comment

ID: 7156970
In case anyone researches this in the future....

While I did use the Winsock control to access the other computer system, once connected I had problems sending/receiving information to the other system (basically I would get a few funky characters, and then nothing).  At this point, I attributed my problems to not having the proper terminal emulation (VT-220,VT-320, etc).  This assumption may have been incorrect, but I believe it to be the case.  With this in mind, I no longer viewed this as realistic goal, as doing the groundwork necessary for providing this emulation would have exceeded the benefits gained.  So, I stuck with utilizing some 3rd party software via COM.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show, step by step, how to integrate R code into a R Sweave document
The purpose of this article is to demonstrate how we can use conditional statements using Python.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question