Automating telnet logon

L

Lina Thompson

I'm not sure if this is the correct newsgroup, but here
goes:
I currently log on to my network by typing the following
from a command prompt:
telnet <url>
i then get a prompt for username and password.
All I want to do is to creat a batch file that somehow
does that for me, so I could just double click and I'd be
online. I'm not that familiar with either telnet or batch
files, all I know is how to call telnet from a batch file,
as in

@echo off
c:\windows\system32\
telnet <url>

but I have no idea how to
1) make it wait for the username prompt
2) enter username and wait for password prompt
3) enter password and exit

would also be really nice if it displayed a message or
something, like successful or not, since the server is
often busy and connecting doesn't always work from the
first time

If this isn't the right newsgroup, please tell me where to
post.
Thanks a lot in advance!
Lina Thompson
 
L

Lina Thompson

Thanks for the suggestion, but I'm rather a beginner, is
there no way to do this just using a batch file, like with
DOS commands or something? Isn't there any simpler way to
go about this?
Thanks, Lina
 
T

Torgeir Bakken (MVP)

Lina said:
I'm not sure if this is the correct newsgroup, but here
goes:
I currently log on to my network by typing the following
from a command prompt:
telnet <url>
i then get a prompt for username and password.
All I want to do is to creat a batch file that somehow
does that for me, so I could just double click and I'd be
online. I'm not that familiar with either telnet or batch
files, all I know is how to call telnet from a batch file,
as in

Hi

VBScript and SendKeys is an option.

Take a look at the threads in the links below for more info about this.


http://groups.google.com/groups?hl=...oe=UTF-8&selm=OHDu2dZtCHA.2484%40TK2MSFTNGP10

http://groups.google.com/groups?hl=...2tocd%241gko7m%241%40ID-156865.news.dfncis.de
 
L

Lina Thompson

Thanks, that worked!
Lina
-----Original Message-----


Hi

VBScript and SendKeys is an option.

Take a look at the threads in the links below for more info about this.


http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF- 8&threadm=OHDu2dZtCHA.2484%
40TK2MSFTNGP10&rnum=1&prev=/groups%3Fhl%3Den%26lr%3D%26ie%
3DUTF-8%26oe%3DUTF-8%26selm%3DOHDu2dZtCHA.2484%
2540TK2MSFTNGP10
8&threadm=b2tocd%241gko7m%241%40ID-
156865.news.dfncis.de&rnum=1&prev=/groups%3Fhl%3Den%26lr%
3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3Db2tocd%25241gko7m%
25241%2540ID-156865.news.dfncis.de




--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter


.
 
H

Herb Martin

Thanks for the suggestion, but I'm rather a beginner, is
there no way to do this just using a batch file, like with
DOS commands or something? Isn't there any simpler way to
go about this?

You question is well taken and actually shows more than simple
beginner sophistication.

The experts are giving you convoluted work-arounds because the
built-in Telnet is very poorly designed. It does not take scripts or
batch well like some other commans -- even the built-in FTP is
much better.

Were this a "Unix telnet" it would probably do exactly what you wish --
Microsoft has long ignored the command line utilities but that has finally
changed with WinXP and Win2003.

Unfortunately, ftp and telnet still haven't been revamped.

You might consider downloading and using NetCat (nc.exe)
http://www.atstake.com/research/tools/network_utilities/

NetCat is far more flexible than telnet and do pretty much everything
that telnet can do.

One thing NetCat cannot do, is to negotiate NTLM authentication which
the Microsoft telnet servers now supports.
 
G

Guest

Hi,

You can use TeraTerm, it's a nice Telnet/Terminal software
and it's free I think.
There you can build scripts... there is a file there with
explanation.

Good luck...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top