Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Whats wrong with this query.....

2 views
Skip to first unread message

kiran

unread,
Nov 19, 2009, 10:18:49 AM11/19/09
to
Hi All,

I am trying to use the below query, but every time it fails with a
Invalid object path error.

"ASSOCIATORS OF
{Win32_NetworkAdapterConfiguration.SettingID=""{E44212B3-348C-4F4E-8601-
D575CD5E6128}""} WHERE ResultClass=Win32_NetworkAdapter"

I googled and found out that if the path has '}', then it needs to be
in double double quoted strings. I have tried lots of combinations but
unfortunately couldn't get it to work.

Thanks,

urkec

unread,
Nov 19, 2009, 2:09:01 PM11/19/09
to
"kiran" wrote:

> .
>


If you want to use the path to an instance of a WMI class in a query you
need to specify the values of the key properties.
Win32_NetworkAdapterConfiguration key property is Index, not SettingId which
is inherited from CIM_Setting. Here is what the query would look like

Associators Of {Win32_NetworkAdapterConfiguration.Index=1} Where ResultClass
= Win32_NetworkAdapter

Note that there are no spaces in '.Index=1' . I don't know why you are using
the SettignId property, but for that to work you would first need to get a
collection of objects with the specified SettingId value, and get associated
Win32_NetworkAdapter instances for each object in the collection.

--
urkec

My blog:
http://theadminblog.blogspot.com/

My CodeProject articles:
http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=4210975

0 new messages