Tuesday, January 06, 2004

Want to know the Processor ID of a machine?

Use the below code snippet in your page to display the Processor ID of the machine. Don't forget to add "using System.Management;" at the top.

ManagementClass managementClass = new ManagementClass("Win32_Processor");
ManagementObjectCollection managementObj = managementClass.GetInstances();

foreach(ManagementObject mo in managementObj)
{
 strResult ="Processor " + mo["ProcessorId"].ToString();
}

No comments: