[Win32] Genererating an ID based on hardware stats

This is a discussion on [Win32] Genererating an ID based on hardware stats within the Windows Programming forums, part of the Platform Specific Boards category; I'm trying to see if I can create a unique ID for a computer based on the hardware and software ...

  1. #1
    Codebot
    Join Date
    Jun 2004
    Location
    Toronto
    Posts
    195

    [Win32] Genererating an ID based on hardware stats

    I'm trying to see if I can create a unique ID for a computer based on the hardware and software that it runs. Here is some criteria I have come up with so far:

    - MAC Address(es)
    - CPUID info
    - OS type, version

    Basically, what I want to achieve is unique ID. However, I realize that if a person upgrades their OS or CPU or NICs, that this ID will be foobared. Is there a way to get a truly unique ID that will not change when hardware and OS changes?
    Founder and avid member of the Internationsl Typo Associateion

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,548
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Codebot
    Join Date
    Jun 2004
    Location
    Toronto
    Posts
    195
    A GUID is great except for one flaw that I'm trying to avoid - it uses a time seed to create the GUID. Therefore, each time you create it, it will always be Unique and different. I'm trying to get it to be unique per machine, regardless of the time you create it.
    Founder and avid member of the Internationsl Typo Associateion

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,548
    Why would you want to create it more than once?

    You've already suggested that doing it more than once is a disaster waiting to happen.
    "I realize that if a person upgrades their OS or CPU or NICs, that this ID will be foobared"
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    Codebot
    Join Date
    Jun 2004
    Location
    Toronto
    Posts
    195
    Quote Originally Posted by Salem View Post
    Why would you want to create it more than once?

    You've already suggested that doing it more than once is a disaster waiting to happen.
    "I realize that if a person upgrades their OS or CPU or NICs, that this ID will be foobared"
    To counter this, I would put in an updating mechanism for when hardware changes. Regardless, What I'm trying to achieve is a GUID that is unique to the hardware only. So it doesn't matter when my program is run, it will always pull (or calculate) a GUID that is a sum of the machine's hardware.

    So, what are some criteria I can use to create a unique footprint of a machine? (excluding a time seed).
    Does Windows have a GUID that it creates when it is first installed?
    Last edited by Mastadex; 09-15-2009 at 12:40 PM.
    Founder and avid member of the Internationsl Typo Associateion

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. why page based I/O can improve performance?
    By George2 in forum C Programming
    Replies: 1
    Last Post: 06-12-2006, 07:42 AM
  2. Whoa... tough one here.
    By nickodonnell in forum Game Programming
    Replies: 10
    Last Post: 10-08-2005, 12:40 PM
  3. Switching CS to Stats?
    By Extrovert in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 08-20-2004, 02:24 PM
  4. Diving into Windows based hardware device drivers
    By AsAdi in forum C++ Programming
    Replies: 2
    Last Post: 02-01-2003, 03:25 PM
  5. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21