Dim Wsh,objWMIService,colMonitoredEvents
Set Wsh = WScript.CreateObject("WScript.Shell")
Set objWMIService = GetObject("winmgmts:\\.\root\wmi")
Set colMonitoredEvents = objWMIService.ExecNotificationQuery("Select * from MSNdis_StatusMediaDisconnect")
Do While True
Set strLatestEvent = colMonitoredEvents.NextEvent
Wsh.run "shutdown -r -f -t 30 -c "&chr(34)&"系统网络断开,机器即将重启,开机前确认网线已插好"&chr(34)
Loop