VBS 路由重启 VBS 路由重启脚本
人气:0想了解VBS 路由重启脚本的相关内容吗,在本文为您仔细讲解VBS 路由重启的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:VBS,路由重启,下面大家一起来学习吧。
复制代码 代码如下:
Set sh=WScript.CreateObject("WScript.Shell")
sh.Run "telnet 192.168.1.1"
WScript.Sleep 1000
sh.SendKeys "admin{ENTER}"
WScript.Sleep 1000
sh.SendKeys "admin{ENTER}"
WScript.Sleep 1000
sh.SendKeys "reboot{ENTER}"
WScript.Sleep 1500
Dim strComputer,objWMIService,objProcess,colProcessList
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = 'telnet.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
next
加载全部内容