TAT 当前离线
列兵
czjt1234 当前在线
少校
rem 另存为 ANSI 编码 ' & cls & cscript.exe /nologo /e:vbscript "%~f0" & pause & exit n = 3 '几秒刷新一次。改成0则表示只显示一次数据,不循环刷新 Set oWMI = GetObject("Winmgmts:\\.\Root\Cimv2") Set oRefresher = CreateObject("WbemScripting.SWbemRefresher") Set oNet = oRefresher.AddEnum(oWMI, "Win32_PerfFormattedData_Tcpip_Networkinterface") Do oRefresher.Refresh() For Each i In oNet.ObjectSet s = "上行 " & i.BytesSentPersec & vbCrLf & _ "下行 " & i.BytesReceivedPersec & vbCrLf WScript.Echo s Next If n = 0 Then WScript.Quit() WScript.Sleep n * 1000 Loop复制代码
评分人数
TOP
lancer 当前离线
三级士官
buyiyang 当前离线
中尉
@echo off title 网速 mode con cols=50 lines=6 echo. set "CUU=[4A" set /p=[?25l<nul echo, 下行 上行 :test wmic path Win32_PerfFormattedData_Tcpip_Networkinterface get BytesSentPersec,BytesReceivedPersec echo,%CUU% timeout /t 1 /nobreak>nul goto test复制代码