Hope somebody here can figure out what I'm doing wrong, I'm developing a few widgets and would like to include a usage monitor for my dsl connection, I've implemented the following function but all I get is 0?
The function is as follows:
Set objWMS = GetObject("winmgmts:\\.\root\cimv2")
'blah blah
Function NetLoad()
'On Error Resume Next
Dim Netitems, objNetinfo
WQLQuery = "Select * from Win32_PerfFormattedData_RemoteAccess_RASTotal"
Set Netitems = objWMS.ExecQuery(WQLQuery)
For Each objNetinfo in Netitems
NetLoad = objNetinfo.BytesReceivedPerSec
'WScript.Echo "NET Load is " & NETLoad
Next
'On Error goto 0
End Function
Anyone? ![]()
Aqua-Soft Forums
msdn isn't very helpful on this point and my old friend Mr Google has let me down yet again.