I’m currently writing an application that retrieves hardware information about a computer.
I need some sort of unique identifier for each hardware component, such as an UID or S/N. I can see this “DeviceID” member in almost every component (inherited from CIM_LogicalDevice), and it says:
“Address or other identifying information to uniquely name the logical device.”
Sounds good! Does this mean that it’s unique for just that specific computer; or is it unique for “all computers in the world” (which is what I need).
Thanks!
Turns out this was not the best way of uniqely name a device, since it COULD be the same UID across different computers.
Instead, I collected a whole bunch of data from each components in the computer (motherboard, CPU, GPU, memory, NIC etc.), hashed them with MD5 to create a sort of “identifier”. Works pretty well.