MatthewKing / DeviceId

A simple library providing functionality to generate a 'device ID' that can be used to uniquely identify a computer.
MIT License
729 stars 118 forks source link

Processor Id vs SerialNumber #22

Closed GitClickOk closed 3 years ago

GitClickOk commented 3 years ago

Firstly, thank you for this awesome project

Just some questions:

  1. Why do you use ProcessorId instead of SerialNumber? I guess compatibility because it looks SerialNumber "is not supported before Windows Server 2016 and Windows 10";
  2. At least for me, appears ProcessorId is something to identify a cpu model, it does not look unique enough... EDIT: I tested 2 computers with the same processor model, and the ProcessorId returned is the same... so my theory is correct. Maybe something to explain in readme.md file?
  3. Do you plan expose this Processor SerialNumber in future?

My reference for these informations is here.

GitClickOk commented 3 years ago

Ok, I have found the answers myself :)

Basically Processor's SerialNumber is unreliable. Some systems returns "Unknown" (like mine), others returns "To be filled by O.E.M".

Thank you

MatthewKing commented 3 years ago

I was just researching a reply as your second message came in. Glad you found the answer, because I'd almost forgotten why that decision was made!