Enum all WMI Classes in a System,...

K

Kerem Gümrükcü

Hi,

how can i enumerate all availbale WMI Classes/Instances on
a runnig System, preferable with .NET and C#?

Thx in advance,...

Regards

Kerem

--
 
M

mayayana

Do you mean that you want to find out what
functionality is available? For that, this might help:

http://www.microsoft.com/downloads/details.aspx?familyid=6430F853-1120-48DB-
8CC5-F2ABDC3ED314&displaylang=en

The download includes a WMI object browser that
runs in an IE window.

But having an object browser won't help much without
having the WMI CHM file. Unfortunately, I think that's
only available as part of the full Windows SDK these
days.

Or you could narrow down your question and detail
exactly what information you're trying to find about
the system. Much of WMI is just superfluous wrappers
around pre-existing functionality that you might be able
to use instead. So you might not necessarily even need WMI.
 
K

Kerem Gümrükcü

Hi,

thanks for your reply. Well, i wrote a little WMI Query Engine
into my application, e.g. you can use WQL to Query Stuff from
WMI. Its more a extra feature for my application, because of the
fact that WMI is very powerfull and holds huge amount of informaton
that i can request on-the-fly. Mostly my application gets everything from
Documented Windows API, Undocumented Stuff and for special
purposes it comes with a Kernel Driver that can pull nearly anything from
os and hardware. But sometimes i need just a little piece of Information
that
WMI with WQL can give me with a simple "SELECT SomeProperty
FROM Win32_WhateverClass", instead using extra API call or even write
a IOCTL for my Driver to do that work. So the point is that all these
classes
like e.g. Win32_BIOS reside in a namespace and i want to find out:

a.) what namespaces does the running operating system have?
b.) what classes do all these namespaces provide and
c.) what instances of classes do they have

How can i enumerate all namespaces available, all the
WMI classes in that namespaces and all instances of
running classes? I think its clear now what i want. I
want to build a View with all that Information, like
the WMI Object Prowser from MS does, into my
Application so that i can see whats available for me
to query from...

Regards

Kerem

--
--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Latest Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."
mayayana said:
Do you mean that you want to find out what
functionality is available? For that, this might help:

http://www.microsoft.com/downloads/details.aspx?familyid=6430F853-1120-48DB-
8CC5-F2ABDC3ED314&displaylang=en

The download includes a WMI object browser that
runs in an IE window.

But having an object browser won't help much without
having the WMI CHM file. Unfortunately, I think that's
only available as part of the full Windows SDK these
days.

Or you could narrow down your question and detail
exactly what information you're trying to find about
the system. Much of WMI is just superfluous wrappers
around pre-existing functionality that you might be able
to use instead. So you might not necessarily even need WMI.
 
M

mayayana

How can i enumerate all namespaces available, all the
WMI classes in that namespaces and all instances of
running classes? I think its clear now what i want. I
want to build a View with all that Information, like
the WMI Object Prowser from MS does, into my
Application so that i can see whats available for me
to query from...

I see. I don't know if this is the best approach... maybe
there's a direct API approach...but in case no one shows
up with a better answer, this might be useful:

The object browser in the download is actually just
webpages with two ActiveX controls embedded:
WBEMObjView.ocx
WBEMInstNav.ocx
It might be feasible to use those. Their dependencies
seem to be part of the basic WBEM install.

The WMI object browser itself provides a code sample,
and looking at the two OCXs in a COM object browser it
appears that neither one requires a license. (There doesn't
seem to be any info. in the download about redistribution
issues.)

( I haven't tried using the controls myself as they're
designed to be incompatible with Win9x and I'm running
Win98SE. It appears that the functionailty you have in
mind would be limited to NT systems.)
 
K

Kerem Gümrükcü

Hi,

thanks for your reply. Well i dont want to use any
external dependencies in my application. The Application
is totally standalone and comes with all extra code that
it needs (everything insde a dll and kernel driver) and can
from Win2000 to Win7, so i dont want to use any OCX
stuff. Thats also one of its design goals: Portabillity to
all major nt based windows os. But i think, i found what
i was looking for:

http://www.csharphelp.com/archives3/archive585.html

Anyway, thanks for your suggestions,...!

Regards

Kerem

--
 

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