ManagementObjectSearcher

ManagementObjectSearcher

例如奔腾或AMD等。

最佳答案

请注意,这是来自VS2003:

using(ManagementObjectSearcher win32Proc = new ManagementObjectSearcher("select * from Win32_Processor"),
    win32CompSys = new ManagementObjectSearcher("select * from Win32_ComputerSystem"),
        win32Memory = new ManagementObjectSearcher("select * from Win32_PhysicalMemory"))
            {
                foreach (ManagementObject obj in win32Proc.Get())
                {
                    clockSpeed = obj["CurrentClockSpeed"].ToString();
                    procName = obj["Name"].ToString();
                    manufacturer = obj["Manufacturer"].ToString();
                    version = obj["Version"].ToString();
                }

07-27 13:37