SIGN UP MEMBER LOGIN:    
ARTICLE

Get Your Hardware Information Using C#

Posted by Ravindra T C Articles | C# Language June 28, 2011
In this article I will discuss how to get information about your system hardware such as available CPU Id, Physical Memory, BIOS-Information, CPU-Speed, Motherboard Maker, CPU Maker.
Reader Level:
Download Files:
 


In this article I will discuss how to get information about your system hardware such as available CPU Id, Physical Memory, BIOS-Information, CPU-Speed, Motherboard Maker, CPU Maker.

The first way is by using Windows Management Instrumentation (WMI) provided by the System.Management namespace. You simply call the Class-Name.

For Example:

Hardware.gif

This code gives you information about the Processor Id.

lblPid.Text = HardwareInfo.GetProcessorId();

This code gives you the HDD Serial No.

lblHDD.Text = HardwareInfo.GetHDDSerialNo();

This code gives you the Board Maker.

lblBM.Text = HardwareInfo.GetBoardMaker();

This code gives you the Information about BIOS Maker.

lblBios.Text = HardwareInfo.GetBIOSmaker();

This code gives you the Information about RAM Memory.

lblPM.Text = HardwareInfo.GetPhysicalMemory();

This code gives you the Information about CPU Speed.

lblCS.Text = HardwareInfo.GetCpuSpeedInGHz().ToString();

This code gives you the Information about CPU Maker.

lblCM.Text = HardwareInfo.GetCPUManufacturer();

Login to add your contents and source code to this article
share this article :
post comment
 

Thank you for this post. Finally i found best code for ProcessorId, Thanks ...

Posted by Rewan Soleimani Apr 05, 2012

Thanks You ! It's very useful .

Posted by K Jabaz Apr 02, 2012

Thanks You ! It's very useful .

Posted by K Jabaz Apr 02, 2012

thanks for sharing...

Posted by sandeep raju dantuluri Mar 26, 2012

Thanks for sharing.

Posted by Arun Choudhary Mar 24, 2012
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
    ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
Become a Sponsor