One important thing in this post you will need to add reference to System.Menagement dll
We need to add the :
using System.Management;
and in button click event next code:)
private void button1_Click(object sender, EventArgs e)
{
ManagementObjectSearcher MOS = new ManagementObjectSearcher("Select * From Win32_BaseBoard");
foreach (ManagementObject getserial in MOS.Get())
{
label1.Text="Your motherboard serial is : "+ getserial["SerialNumber"].ToString();
}
}
Error 2 The type or namespace name 'ManagementObjectSearcher' could not be found (are you missing a using directive or an assembly reference?)
ReplyDeleteYes, that's mean that you need to include "System.Menagement dll" into your project.
ReplyDelete"One important thing in this post you will need to add reference to System.Menagement dll"
The post is little bit difficult, but i think i will handle it. The last and the major part is quite difficult for me to apply it easily. Anyway i will try it.
ReplyDeletepst recovery
it shows 000000 in windows xp :(
ReplyDeleteHi Researcher J K,
ReplyDeleteI wrote this post on my XP OS PC. Are you sure that you use correct code and reference ?
Brilliant! Thank you very much!
ReplyDeleteHendo
You're welcome endo ;)
ReplyDeleteI found that this code gives you the serial number of the physical board and not the system serial number.
ReplyDeleteIf you change the Win32_BaseBoard to Win32_BIOS you can pull the system's serial as set in the BIOS.
As a side note, I did this code on Windows 7 Enterprise.
DeleteGreat Bryan, Thanks on your share!
DeleteThanks Man
ReplyDeleteGreat find, even if it's from 2013. Thanks!
ReplyDelete