VBS 路由重启脚本
程序员文章站
2022-04-10 08:02:33
复制代码 代码如下:set sh=wscript.createobject("wscript.shell") sh.run "telnet 192.168.1.1" wsc...
复制代码 代码如下:
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
上一篇: 是不是不爱我了
下一篇: 用VBS脚本删除指定以外的文件或文件夹