1. I need to do telnet in a batch file just for validation and invoke some 'X' application
2. I can't use languages like perl/vbscript/python/java, except DOS batch script
3. while doing telnet in the batch file if the user types ctrl-D, it is coming out from the telnet session and
proceeding further. So, if I can suppress(unset) ctrl-D then user can't escape the telnet authentication.
4. User to successfully login to the telnet session then only he can proceed further in the batch file.
5. EXAMPLE:
@ECHO OFF
telnet <host name>
ECHO %ERRORLEVEL%
pause
<invoke some X application>
...
Actually I am a UNIX guy, I am not familiar with DOS. Please suggest me some ideas keeping in view of my
limited resources.
Thankx
1) when you say invoke 'X' application, is 'X' at remote or local?
2) how restricted are you? you can't run WSH/CSRIPT (vbscript) even?
3) u can try setting your batch to telnet to server using automatic login (-a) or (-l)
eg telnet -a host , or telnet -l username host
If all else fails, you can try ftp login using the -s option , if the user has supplied the correct credential and password, he can continue.