All day I try to write the code, or how it does not work! Help with the example WORKERS, who would show the number of the mat. fees.
I'll tell you the idea, I want to identify each computer by some parameter, if you have other ideas, write.
All day I try to write the code, or how it does not work! Help with the example WORKERS, who would show the number of the mat. fees.
I'll tell you the idea, I want to identify each computer by some parameter, if you have other ideas, write.
The standard method is a WMI query. If WMI contains a number, it will be retrieved.
var results = new ManagementObjectSearcher("SELECT SerialNumber FROM Win32_BaseBoard"); foreach (var board in results.Get()) { foreach (var property in board.Properties) Console.WriteLine("{0} = {1}", property.Name, property.Value); } But, unfortunately, not all boards have it. Therefore, it is better to take another parameter, such as the MAC address or processor number.
foreach (var ni in NetworkInterface.GetAllNetworkInterfaces()) { Console.WriteLine(ni.GetPhysicalAddress()); } using , you also need to add a link to the System.Management assembly. - stanislavSource: https://ru.stackoverflow.com/questions/96763/
All Articles