Using System. Management;
Obtain the CPU serial numberCode
String Cpuinfo = "" ; // CPU serial number
Managementclass cimobject = New Managementclass ( " Win32_processor " );
Managementobjectcollection MoC = Cimobject. getinstances ();
Foreach (Managementobject Mo In MOC)
{
Cpuinfo = Mo. properties [ " Processorid " ]. Value. tostring ();
}
Obtain the network card hardware address Managementclass MC = New Managementclass ( " Win32_networkadapterconfiguration " );
Managementobjectcollection failed = MC. getinstances ();
Foreach (Managementobject Nic In Token)
{
If (Convert. toboolean (NIC [ " Ipenabled " ]) = True )
{
Mac = Nic [ " Macaddress " ]. Tostring (); // MAC address
}
}
Obtain the hard disk ID String Hdid;
Managementclass cimobject = New Managementclass ( " Win32_diskdrive " );
Managementobjectcollection MoC = Cimobject. getinstances ();
Foreach (Managementobject Mo In MOC)
{
Hdid = ( String ) Mo. properties [ " Model " ]. Value;
}