Hard Drive Serial Numbers

Discussion in 'Game Development (Technical)' started by Jamie W, Jan 3, 2008.

  1. Jamie W

    Original Member Indie Author

    Joined:
    Apr 16, 2006
    Messages:
    1,211
    Likes Received:
    0
    I have two laptops, same brand / model ...

    Using GetVolumeInformation() to determine hard drive serial number, it seems that both laptops have the exact same serial number!!

    Is that normal?
     
  2. Arex

    Arex New Member

    Joined:
    Oct 7, 2006
    Messages:
    66
    Likes Received:
    1
    The hard drive serial number probably is the one that is generated DOS or Windows every time you format your hard drive. It isn't the model number or serial number of your physical hard drive.

    So I think it can happen. :)
     
  3. Jamie W

    Original Member Indie Author

    Joined:
    Apr 16, 2006
    Messages:
    1,211
    Likes Received:
    0
    Okay.

    I'm trying to get a unique machine finger-print, so I guess using the HD serial number isn't a good solution?

    Are there any other options available?

    Cheers,
     
  4. ChrisP

    Indie Author

    Joined:
    Feb 5, 2007
    Messages:
    971
    Likes Received:
    0
    MAC address, aka Ethernet address, of the network card(s), if any. But that can be changed. And network cards can be swapped in and out for whatever reason (upgrading, replacing broken ones), so they can change for legitimate reasons too.
     
  5. Arex

    Arex New Member

    Joined:
    Oct 7, 2006
    Messages:
    66
    Likes Received:
    1
    No, don't use HD serial number, I'v seen it causing problems to customers (including me). :)

    Try using some registry value from Window's registry, I think they have some unique values.
     
  6. zoombapup

    Moderator Original Member

    Joined:
    Nov 25, 2004
    Messages:
    2,890
    Likes Received:
    0
    We used to lock games to network adapter mac address (back when there were less of them and they had hardware locked addresses).

    I'm sure there's a windows api somewhere to get something like this. Try the platform sdk?
     
  7. James C. Smith

    Moderator Original Member

    Joined:
    Aug 21, 2004
    Messages:
    1,768
    Likes Received:
    0
    Hard drives do have unique serial numbers. But you are reading the “software” serial number that was written when the drive was formatted (or cloned). You need to read the hardware serial number with a different API.
     
  8. HappyCat

    Original Member

    Joined:
    Jun 28, 2005
    Messages:
    54
    Likes Received:
    0
    I looked into this a few years ago to try to tie an application we were developing to a single PC.

    Unfortunately the "software" HD serial number isn't unique (ghosted drive images will all have the same number - so, as you discovered PCs of the same make and model will typically have the same number) and the "hardware" serial number isn't always set (my memory's a bit vague but in a company of about 8 PCs, I think 3 or 4 didn't have one at all).

    We also decided we couldn't rely on MAC address (for the reasons listed previously, as well as the fact that not all PCs have network cards).

    So in the end we gave up on the idea and just went with a more "normal" serial number approach.
     
  9. Jamie W

    Original Member Indie Author

    Joined:
    Apr 16, 2006
    Messages:
    1,211
    Likes Received:
    0
    Hmmm, it seems some machines are reporting the Hard Drive Serial as being 0 (zero).

    Can anyone recommend an alternative to use, to get a uniq id (hardware fingerprint) for a windows PC?
     
  10. Nikster

    Original Member

    Joined:
    Jul 27, 2004
    Messages:
    698
    Likes Received:
    0
    There is a way, but suffers the same fate with any hardware check, and that's replacing and getting and different ID, I sent via PM as these forums are google cached ;)
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer