windows批处理实现telnet登陆和运行命令--设置缺省输入法为英文
2014年9月11日14:13:33
批处理文件1.bat的内容
@echo off
echo set sh=WScript.CreateObject("WScript.Shell") >telnet_tmp.vbs
echo sh.SendKeys "telnet 192.168.4.217 7500~">>telnet_tmp.vbs
echo WScript.Sleep 1000 >>telnet_tmp.vbs
echo sh.SendKeys "coder~">>telnet_tmp.vbs
echo WScript.Sleep 1000 >>telnet_tmp.vbs
echo sh.SendKeys "itsmoe_etc~">>telnet_tmp.vbs
echo WScript.Sleep 1000 >>telnet_tmp.vbs
echo sh.SendKeys "date~">>telnet_tmp.vbs
echo WScript.Sleep 1000 >>telnet_tmp.vbs
echo sh.SendKeys "exit~">>telnet_tmp.vbs
echo WScript.Sleep 3000 >>telnet_tmp.vbs
echo sh.SendKeys "exit~">>telnet_tmp.vbs
start cmd
cscript //nologo telnet_tmp.vbs