怎样用vbs判断是否连网?
Dim wmi
Set wmi=GetObject("winmgmts://./root/cimv2")
Set xxx=wmi.ExecQuery("Select * From Win32_PingStatus Where Address='www.sohu.com'")
For Each u in xxx
If u.statuscode = 0 Then msgbox "通的"
Next
赞 (0)
Dim wmi
Set wmi=GetObject("winmgmts://./root/cimv2")
Set xxx=wmi.ExecQuery("Select * From Win32_PingStatus Where Address='www.sohu.com'")
For Each u in xxx
If u.statuscode = 0 Then msgbox "通的"
Next