I need in my license Program use hardware id ,I tried use WMI,but it still slow .
I need Cpu,HDD,Motherboard info.
I need in my license Program use hardware id ,I tried use WMI,but it still slow .
I need Cpu,HDD,Motherboard info.
For more details refer to this link
The following code will give you CPU ID:
namespace required System.Management
ManagementObjectCollection mbsList = null;
ManagementObjectSearcher mbs = new ManagementObjectSearcher("Select * From Win32_processor");
mbsList = mbs.Get();
string id="";
foreach (ManagementObject mo in mbsList)
{
id = mo["ProcessorID"].ToString();
}
For Hard disk ID use the following
ManagementObject dsk = new ManagementObject(@"win32_logicaldisk.deviceid=""c:""");
dsk.Get();
string id = dsk["VolumeSerialNumber"].ToString();
Use the following for motherboard id:
ManagementObjectSearcher mos = new ManagementObjectSearcher("SELECT * FROM Win32_BaseBoard");
ManagementObjectCollection moc = mos.Get();
string serial="";
foreach (ManagementObject mo in moc)
{
serial = (string)mo["SerialNumber"];
}
For more details refer this-link