tony Tiankoon wrote:
> If from the command [telnet.cmd("echo %ERRORLEVEL")],to make sure that
> there is not any exit command in the windows batch script.

Yes, that's basically what you'll need to get it back from telnet.

However, if the server has sshd running then it's possible to execute a 
command remotely and get the command status back properly.

Ruby's Net::SSH provides a rather awkward API unfortunately, but you 
could copy the example of "vlad" and just shell out to local ssh command 
(or pssh.exe if it's a Windows client)
-- 
Posted via http://www.ruby-forum.com/.