Solved

Automate Telnet with VB

Posted on 2002-06-07
6
609 Views
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,

Michael
 
0
Comment
Question by:mjs082969
  • 4
  • 2
6 Comments
 

Author Comment

by:mjs082969
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.
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 7061899
http://www.btinternet.com/~vbadmincode/code/telnet.zip

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

Author Comment

by:mjs082969
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?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 43

Accepted Solution

by:
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.
0
 

Author Comment

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

Author Comment

by:mjs082969
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.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB6 - Compare and highlight cell not the same 3 42
Add a task in Outlook from access 11 35
Problem to start Neon 20 85
VB6 ListBox Question 4 32
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
This video teaches viewers about errors in exception handling.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

912 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now