How to get my motherboard serial number using C#?
Sometimes we might want to identity the unique user for some purposes by knowing the machine identity they are using. Software licensing for instance, we could use his machine processor Id or motherboard id to uniquely identify them. So here are the tricks: using System.Management; //Get motherboard's serial number ManagementObjectCollection mbsList = null; ManagementObjectSearcher mbs = new ManagementObjectSearcher ("Select * From Win32_ BaseBoard "); mbsList = mbs .Get(); foreach ( ManagementObject mo in mbsList ) { textBox 1.Text = mo[" SerialNumber "]. ToString (); } //Get Processor's Identity ManagementObjectCollection mbsList = null; ManagementObjectSearcher mbs = new ManagementObjectSearcher ("Select * From Win32_processor"); mbsList = mbs .Get(); foreach ( ManagementObject mo in mbsList ) { textBox 1.Text = mo[" ProcessorID "]. ToString (); } Warning, although these are the methods to get the id, I feel that using t...
Comments