我找到了这个链接:
但是,当我在 Visual c# express edition 2008 中尝试此代码时,它说:
Error 1 The type or namespace name 'ManagementObjectSearcher' could not be found
(are you missing a using directive or an assembly reference?)
C:\Users\Andy\Documents\Visual Studio 2008\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs 15 17 ConsoleApplication1
在 2 行似乎很重要的其他类似错误中!
看起来代码段缺少一些导入或什么?
我正在使用 Windows 7...请帮助!
安迪