HDD serial number flipped every 2 bytes in Windows XP, Vista and 7 but not in Windows 8

后端 未结 5 1466
一生所求
一生所求 2021-02-19 05:25

I need to get HDD serial number to use it as a key for licensing a software. I used diskid32 code in this url: http://www.winsim.com/d

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-19 05:46

    Basically you're relying on data that's not strictly reliable to begin with. Drives may change over the lifetime of a computer; all the while getting exactly the right serial number isn't even important to your product.

    One easy hack I can think of is to normalize the serial number, e.g. by sorting the digits; this will make more drives look alike, but I doubt it will become an issue.

    Another way of looking at the problem is that the application should provision for serial number changes; the user could be informed about the licensing issue (for whatever reasons) and asked to contact the support department with a generated code (not necessarily the serial number itself). Given this code, support can then create a new license for the customer.

提交回复
热议问题