网络连接状态建立于断开的VBS脚本
导读:收集整理的这篇文章主要介绍了网络连接状态建立于断开的VBS脚本,觉得挺不错的,现在分享给大家,也给大家做个参考。 断开连接提示 复制代码 代码如下: strComputer = "."...
收集整理的这篇文章主要介绍了网络连接状态建立于断开的VBS脚本,觉得挺不错的,现在分享给大家,也给大家做个参考。 断开连接提示 复制代码 代码如下:
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\wmi")
Set colMonIToredEvents = objWMIService.ExecNotificationQuery _
("Select * From msndis_statusMediaDisconnect")
do while True
Set strLatestEvent = colMonitoredEvents.NextEvent
Wscript.Echo "A network connection has been lost:"
WScript.Echo strLatestEvent.InstanceName, Now
Wscript.Echo
Loop
建立连接提示
复制代码 代码如下:
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\wmi")
Set colMonitoredEvents = objWMIService.ExecNotificationQuery _
("Select * from MSNdis_StatusMediaConnect")
Do While True
Set strLatestEvent = colMonitoredEvents.NextEvent
Wscript.Echo "A network connection has been made:"
WScript.Echo strLatestEvent.InstanceName, Now
Wscript.Echo
Loop
您可能感兴趣的文章:
- C#中判断本地系统的网络连接状态的方法
- android 检查网络连接状态实现步骤
- c#判断网络连接状态
声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!
若转载请注明出处: 网络连接状态建立于断开的VBS脚本
本文地址: https://pptw.com/jishu/609866.html
