0

I want to make a software to activate it with a unique Id. So I get mac address for serial number of the software but in some computers mac is changed by a reset of a computer. So again I must set serial number to active the software.

What do you propose to use for a serial number in C# ?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
ssss
  • 19
  • 1
  • 7

1 Answers1

0

There is no universal hardware ID that works, Intel tried to provide one in their Pentium III's with the Processor Serial Number, but there was a large controversy over it and it was removed from later models and did not exist in later generations.

There are specific hardware id's you can read off but there is no standardized way to do it. See the linked question "What's a good way to uniquely identify a computer?" for some possible choices.

The option I do when I need to do this is use the windows serial number, that should be unique per machine, even for cloned machines (due to it changing during the sysprep process), unless they are violating Microsoft's licencing too and cloning without syspreping.

This can be retreived via WMI

var s = new ManagementObjectSearcher("SELECT SerialNumber FROM Win32_OperatingSystem");
var obj = s.Get().Cast<ManagementObject>().First();
var serial = obj["SerialNumber"].ToString();
Scott Chamberlain
  • 124,994
  • 33
  • 282
  • 431