- 帖子
- 32
- 积分
- 139
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2009-10-19
|
回复 3# yu2n
感谢 yu2n 的提示
代码已经用上:
Set ws = WScript.CreateObject("WScript.Shell")
TheIP = "192.168.1.105"
PingSet = " -n 1 -l 1 -w 500 "
TheState = ws.run("ping.exe " & TheIP & PingSet ,0, True)
If TheState = 0 Then
MsgBox "Ping = True"
Else
MsgBox "Ping = False"
End If
判断网络是否畅通,当大于500毫秒即判断为超时。
久没上网,回复晚了。见谅见谅哈 |
|