like whether it is pentium or AMD etc.
Please note that this is from 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();
}
The System.Management Namespace Provides access to a rich set of management information and management events about the system, devices, and applications instrumented to the Windows Management Instrumentation (WMI) infrastructure.
The Win32 Processor WMI class represents a device that can interpret a sequence of instructions on a computer running on a Windows operating system. On a multiprocessor computer, one instance of the Win32_Processor class exists for each processor. The class includes a Processor family type
field, encoding things like AMD Opteron Processor Family.
An example of C# issuing WMI query is at the end of the page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With