WMI 报错 ??? 详细信息如下...
龙行者 2010-01-13 04:29:35 ManagementScope scope = new ManagementScope(new ManagementPath("root\\CIMV2"));
ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_Product");
searcher.Scope = scope;
searcher.Options = new EnumerationOptions(null, TimeSpan.MaxValue, 1, true, false, true, true, false, true, true);
ManagementObjectCollection collection = searcher.Get();
foreach (ManagementObject nextObject in collection)
{
Console.WriteLine(nextObject.GetPropertyValue("Caption"));
}
Console.ReadKey(true);
C#中我想用wmi 中的WQL 查询出安装在本机的产品信息
运行后报的错位
“在 System.Management.ManagementException 中第一次偶然出现的“System.Management.dll”类型的异常 通常故障”
非常郁闷的错误 都不知道如何下手了。