I'm using WMI in C++ classes to retrieve the serial number of my motherboard. The query is the following :
"SELECT SerialNumber FROM Win32_BaseBoard"
I wrote the query myself so i'm not certain it is correct, but it does return something :
/9637CW1/CN1296131Q0BA8/
. The returned string is in the same format on multiple computers so i assume the query is correct.
My question is : am i really querying the motherboard serial number here ? Because i saw another class called "Win32_MotherboardDevice"
(which has no "serial number" property). Would it be a good idea to use this as a computer identifier ? I am currently using the HDD serial number, but i thought using the serial number of a more reliable component such as the motherboard would be better since a disk is more likely to be changed than a motherboard.
Thank you :)
What I have found is that retrieving the serial number of the mother board can result in very different results depending on the manufacturer and the distribution channel. Some manufacturers who sell to the end customer and have good support processes with equipment repair will be consistent about setting the serial number information for WMI. Other manufacturers providing OEM type equipment will depend on the OEM to set the serial number.
Since the serial number is within a particular domain or name space based on manufacturer, it is possible though improbable that different manufacturers may have used the same serial number so you would really need to know both manufacturer as well as serial number.
Some point of sale terminals are consistent about the serial number and part of the procedure for mother board replacement in the case of a failed mother board is to set the serial number of the replacement board to the serial number of the board being replaced. This implies that someone could have the same serial number for several pieces of equipment similar to doing LAN NIC MAC spoofing.
The WMI query will make a difference as to the serial number provided. In addition to the serial number there is also an asset tag property as well.
Looking at the documentation for
Win32_MotherboardDevice
and trying a few properties, there does not seem to be much useful data there, certainly not something similar to a unique serial number.On a Dell laptop With Windows XP when I run a C++ application that uses WMI to see the results of several different
Select
WMI queries for several different properties I get the following results:Looking on the bottom of this laptop I see a sticker that has a bar code along with printing that says "SERVICE TAG 49495G1" so for this laptop the serial number retrieved is the service tag identifier. I can go to the Dell website and look up this service tag in the support area.
A new point of sale terminal meant for resale with POS Ready 7 version of Windows provides the following output with the same C++ WMI application. This is similar to the output from a PC I constructed myself from purchased parts which also did not have serial numbers That PC is running Windows 8.1.