use telnet auto reboot TP-Link route

pls copy the follow txt to bat

create task to define auto run.

 

rem ================
@del c:\temp.vbs
@echo on error resume next >>c:\temp.vbs
@echo dim WshShell>>c:\temp.vbs
@echo Set WshShell = WScript.CreateObject("WScript.Shell")>>c:\temp.vbs
@echo WshShell.run"cmd">>c:\temp.vbs
@echo WshShell.AppActivate"c:\windows\system32\cmd.exe">>c:\temp.vbs
@echo WScript.Sleep 200>>c:\temp.vbs
@echo WshShell.SendKeys"telnet 10.0.0.1">>c:\temp.vbs
@echo WshShell.SendKeys"{ENTER}">>c:\temp.vbs
@echo WScript.Sleep 200>>c:\temp.vbs
@echo WshShell.SendKeys"TP-Link username">>c:\temp.vbs
@echo WshShell.SendKeys"{ENTER}">>c:\temp.vbs
@echo WScript.Sleep 200>>c:\temp.vbs
@echo WshShell.SendKeys"TP-Link password">>c:\temp.vbs
@echo WshShell.SendKeys"{ENTER}">>c:\temp.vbs
@echo WScript.Sleep 200>>c:\temp.vbs
@echo WshShell.SendKeys"en">>c:\temp.vbs
@echo WshShell.SendKeys"{ENTER}">>c:\temp.vbs
@echo WScript.Sleep 200>>c:\temp.vbs
@echo WshShell.SendKeys"TP-Link Privilege Password">>c:\temp.vbs
@echo WshShell.SendKeys"{ENTER}">>c:\temp.vbs
@echo WScript.Sleep 200>>c:\temp.vbs
@echo WshShell.SendKeys"sys reboot">>c:\temp.vbs
@echo WshShell.SendKeys"{ENTER}">>c:\temp.vbs
@echo WScript.Sleep 200>>c:\temp.vbs
@echo WshShell.SendKeys"Y">>c:\temp.vbs
@echo WshShell.SendKeys"{ENTER}">>c:\temp.vbs
@echo WScript.Sleep 100>>c:\temp.vbs
@echo WshShell.SendKeys"exit">>c:\temp.vbs
@echo WshShell.SendKeys"{ENTER}">>c:\temp.vbs
@echo WScript.Sleep 1000>>c:\temp.vbs
@call c:\temp.vbs
taskkill /im cmd.exe
rem ================

本文出自 “成就梦想---唯有执著努..” 博客,谢绝转载!

你可能感兴趣的:(telnet,bat,auto)