<p>I need to create a BAT file to run an application through telnet, but as far as I know there is no way to do this on DOS. Telnet does not allow any command to be sent to the remote machine at the very instant of the connection, and each subsequent command in the BAT file would only be executed after telnet stops. This hypothetical piece of code illustrates what I want to do:</p>

<pre><code>telnet 100.99.98.1 "C:\Application\app.exe -a -b -c"
</code></pre>

<p>And that would run the app.exe on the machine 100.99.98.1 with three parameters. Despite my efforts, nothing worked. Is there a way to do that?</p>

<p>Tks,</p>

<p>Pedrin Batista</p>

Using telnet in the way you want to is imho not possible.
You could you secure shell (ssh), but a ssh server has to run on the remote machine (100.99.98.1 in you case).
EDIT:
See
http://sshwindows.sourceforge.net/
for a ssh client and server (based on cygwin) for Windows.