Again... I only mentioned perl as its ONE of the options given in the thread. Your original question didn't mention anything about the need to run on "any old windows machine with no extra software"...
I didn't think I'd signed up for this site in the past, but I guess its possible - and I had the cookie needed for access...
Try going to the homepage...
http://www.winscriptingsolutions.com
Then you may or may not need to sign up...
Then do a search (in the search box) for
telnetscript
Its the first thread returned titled "automate telnet?"
There are other solutions given in the thread apart from perl. But there is no straight DOS one. From memory there is suggestion of a windows scripting host one, though (although it has limitations) but that may do what you want.
Take a read anyways. You may change your mind about how you attempt to tackle the problem.
As I said, I dont believe there is a pure DOS based solution to this and neither does anyone in the above forum.
If you come up with one, then I'd certainly like to see it!
Hope you get it in the end...
Tim.