Help with WQL query

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
 
P

Peter Falz

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top