Reputation: 55
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.
Upvotes: 3
Views: 191
Reputation: 941970
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.
Upvotes: 6
Reputation: 176219
Have a look at the classes in the System.Management
namespace.
Upvotes: 3