From: Liu Nuaadupu Date: 2010-01-13T15:05:14+09:00 Subject: how to judge the command result of batch by Net::telnet telnet = Net::Telnet::new("Host" => "192.168.0.16", "Timeout" => 10, "Prompt" => /[$%#>] \z/n) telnet.login("username", "password") { |c| print c } result = telnet.cmd("c:\test.bat") telnet.close how to judge the result of the batch? If from the result variable you must know the true result. If from the command [telnet.cmd("echo %ERRORLEVEL")],to make sure that there is not any exit command in the windows batch script. have any other good idears? -- Posted via http://www.ruby-forum.com/.