有没有办法生成WMI代码/类?
答
更简单的方法(Visual Studio的用户):
-
添加WMI类VisualStudio中的服务器资源管理器。例如。
-
获取Visual Studio来调用MgmtClassGen.exe你。例如。
@VanOrman提供附加references for MgmtClassGen.exe。
关于SDK分离的更新设置,路径有点不同e。 G。 `c:\ Program Files(x86)\ Microsoft sdks \ windows \ v8.0a \ bin \ NET FX 4.0 Tools` – 2013-10-24 18:03:52
@MikeBaz and @VanOrman - see [my comment above](http://stackoverflow.com/questions/ 44504/is-there-a-way-to-generate-wmi-code-classes/44506#comment-60961898) - 你知道如何在Visual Studio 2015中使用它吗? – Tar 2016-04-18 06:22:09