[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
if ping("ping.com")<888 then xxxxxxxxxxxxx
  1. Function Ping(url) '检查网络Ping值,单位毫秒
  2.     Set objWMI = GetObject("winmgmts:\\.")
  3.     Set colPings = objWMI.ExecQuery ("Select * From Win32_PingStatus where Address = '" & url & "'")
  4.     Ping=9999
  5.     On error resume next
  6.         For Each objPing in colPings
  7.             Ping=objPing.ResponseTime+0
  8.         Next
  9.     On error goto 0
  10. End Function
复制代码

TOP

返回列表