tags:

views:

47

answers:

2

Hi, I have seen the usefull that WMI can be.

My question, is all WMI API enable to use with a .net language like C#, or is it only through c++ and Scripting enable? Do you know where Can I find information about.

I could only find a few examples.

Thank you a lot.

+3  A: 

Have a look at the classes in the System.Management namespace.

0xA3
+4  A: 

Oh Lord, no. WMI is farking painful in C++, System.Management is a very nice wrapper around the COM code you'd have to write in C++. You don't even have to write the C# code yourself. Download the WMI Code Creator Tool, it lets you play with the queries and it automatically generates the C# code to cut-and-paste into your project.

Hans Passant