on error resume next //告訴編譯器遇到錯(cuò)誤,,繼續(xù)執(zhí)行下面的語(yǔ)句 dim WshShell Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.run"cmd /k telnet 192.168.0.82" //打開(kāi)telnet 并輸入ip WshShell.AppActivate"telnet.exe" //激活窗口,,為后面輸入命令作準(zhǔn)備 WScript.Sleep 2000 WshShell.SendKeys"{ENTER}" WshShell.SendKeys"krftp{ENTER}" //發(fā)送用戶(hù)名,,密碼,,要運(yùn)行的程序 WScript.Sleep 2000 WshShell.SendKeys"123456{ENTER}" WScript.Sleep 2000 WshShell.SendKeys"cd /d d:\krdb{ENTER}" WScript.Sleep 2000 WshShell.SendKeys"1.bat{ENTER}" WshShell.run "cmd /c tskill telnet" WshShell.run "cmd /c tskill cmd" |
|