|
|
|
date: Tue, 6 May 2008 12:47:05 +0100,
group: microsoft.public.win32.programmer.wmi
back
Re: Schema Query - Top Level Classes Only
Thanks Jeffrey, urkec,
This answers my question.
The reason I wanted to do it by method calls, is so that I could use
recursion to enum the classes and sub-classes (starting from any point
in the tree). The WQL query is less suited to this.
Jeffrey Tan[MSFT] wrote:
> Hi Gerry,
>
> Thanks for your feedback. Oh, it seems that urkec has provided the correct
> answer to you. Thank you urkec!
>
> Actually, it's not clear to me why you prefer to not use the meta_class
> query, but you can accomplish the same thing by specifying the Shallow flag:
>
> const wbemQueryFlagShallow = 1
>
> set osvc = getobject("winmgmts:root\cimv2")
>
> for each ocls in osvc.subclassesof("", wbemQueryFlagShallow)
> wscript.echo ocls.path_.class
> next
>
> Thanks.
>
> Best regards,
> Jeffrey Tan
> Microsoft Online Community Support
> =========================================
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> msdnmg@microsoft.com.
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
--
Gerry Hickman (London UK)
date: Mon, 12 May 2008 22:14:37 +0100
author: Gerry Hickman am
|
|