VBS 路由重启脚本_vbs教程-查字典教程网
VBS 路由重启脚本
VBS 路由重启脚本
发布时间:2016-12-28 来源:查字典编辑
摘要:复制代码代码如下:Setsh=WScript.CreateObject("WScript.Shell")sh.Run"telnet192.1...

复制代码 代码如下:

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 & "rootcimv2")

Set colProcessList = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = 'telnet.exe'")

For Each objProcess in colProcessList

objProcess.Terminate()

next

相关阅读
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • 最新vbs学习
    热门vbs学习
    脚本专栏子分类