Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to generate WMI code/classes?

How do you generate C# classes for accessing WMI?

like image 390
VanOrman Avatar asked Sep 04 '08 19:09

VanOrman


1 Answers

To generate strongly typed WMI classes, use the Management Strongly typed class generator (MgmtClassGen.exe). It's usually in C:\Program Files\Microsoft Visual Studio X\SDK\vX\Bin. The parameters are at MSDN and they even have a page describing the code generated. If you have to do a lot of work with WMI, it's a lifesaver.

like image 167
VanOrman Avatar answered Sep 21 '22 21:09

VanOrman