Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with wmi
#1
Hi Gintaras, hi all

According to MSDN,

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * from Win32_TapeDrive")

Wscript.Echo colItems.Count

So when using this code:

IDispatch wmi._getfile("winmgmts:")
IDispatch col = wmi.ExecQuery("SELECT * FROM Win32_NetworkAdapter WHERE PhysicalAdapter = TRUE AND ConfigManagerErrorCode =22" @ wbemFlagReturnImmediately|wbemFlagForwardOnly))

why

_i=col.Count

does produce a exception????

_i should be 4 on my computer.

TY


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)