VBS 断网后自动关机30秒后
时间:2022-01-01 11:29:28|栏目:VBS|点击: 次
复制代码 代码如下:
Dim Wsh,objWMIService,colMonitoredEvents
Set Wsh = WScript.CreateObject("WScript.Shell")
Set objWMIService = GetObject("winmgmts:\. ootwmi")
Set colMonitoredEvents = objWMIService.ExecNotificationQuery("Select * from MSNdis_StatusMediaDisconnect")
Do While True
Set strLatestEvent = colMonitoredEvents.NextEvent
Wsh.run "shutdown -s -t 30 -c "&chr(34)&"系统网络断开,机器即将关闭"&chr(34)
Loop
上一篇:vbs得没公开对象
栏 目:VBS
下一篇:Dynamic Activity Window动态活动窗口vbs
本文标题:VBS 断网后自动关机30秒后
本文地址:http://www.codeinn.net/misctech/188754.html