Help with WQL query

  • Thread starter Thread starter rs
  • Start date Start date
R

rs

Hello,

Here is my query:

Set colItems = objWMIService.ExecQuery("SELECT * FROM
Win32_NetworkAdapterConfiguration WHERE IPAddress LIKE '%192.168%' AND
IPEnabled = 'True' ")

This returns (null): 0x80041017 no matter how I chnage the LIKE clause.

According to the MSDN site, the LIKE operator is supported with WQL.

Any help would be much appreciated.

Thanks,

Bob
 
Hi Bob,

rs said:
Here is my query:
Set colItems = objWMIService.ExecQuery("SELECT * FROM
Win32_NetworkAdapterConfiguration WHERE IPAddress LIKE '%192.168%' AND
IPEnabled = 'True' ")

This returns (null): 0x80041017 no matter how I chnage the LIKE clause. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/like_operator.asp

According to the MSDN site, the LIKE operator is supported with WQL.
1st
LIKE is only available on XP and W2K3. Your system has one of this
both installed?

2nd
LIKE can't be used for "IPAddress", because this property is an array
and arrays are not supported by WQL.

Take a look at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/querying_with_wql.asp


Bye
Peter
 
Back
Top