Motherboard ID - WMI C++ - Reliable?
Asked Answered
L

1

5

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 :)

Laflamme answered 15/5, 2014 at 10:25 Comment(6)
perhaps it's printed on the motherboard, so you could compare that number with the wmi return value.Turoff
@Turoff Thanks for your answer. There is indeed a sticker with "PPID" with a number starting by CN something, but it doesn't match the one i retrieve programatically. Is the PPID the serial number of my motherboard ? If yes which one to trust ? The sticker or WMI ?Laflamme
It is not reliable, and you should not use it as a unique system identifier. It is up to the manufacturer whether they fill that field in. Plenty of them do not. What'll your app do if it's blank?Numerate
Fallback on HDD serial i guess.Laflamme
HDD serial might not be easy to get or reliable on RAID configurationsPhosphate
The closest piece of data Win32_MotherboardDevice has is DeviceID which returns the text Motherboard my case (while Win32_BaseBoard's SerialNumber does return a serial number looking string). So BaseBoard looks as the best option (by the way the doc page on BaseBoard states The Win32_BaseBoard WMI class represents a baseboard, which is also known as a motherboard or system board)Apotheosis
S
3

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:

Connected to ROOT\CIMV2 WMI namespace

Query for SELECT * FROM Win32_SystemEnclosure
  SMBIOS SerialNumber: 49495G1
  SMBIOS Name: System Enclosure
  SMBIOS SMBIOSAssetTag:
  SMBIOS Manufacturer: Dell Inc.

Query for SELECT * FROM Win32_BaseBoard
  SMBIOS SerialNumber: .49495G1.CN486438441035.
  SMBIOS Product: 0UY141
  SMBIOS Name: Base Board
  SMBIOS Manufacturer: Dell Inc.

Query for SELECT * FROM Win32_BIOS
  SMBIOS SerialNumber: 49495G1
  SMBIOS Name: Phoenix ROM BIOS PLUS Version 1.10 A10
  SMBIOS Manufacturer: Dell Inc.

Query for SELECT * FROM Win32_ComputerSystem
  SMBIOS Name: CIT-31204E1FF03
  SMBIOS Manufacturer: Dell Inc.

Query for SELECT * FROM Win32_ComputerSystemProduct
  SMBIOS Name: Latitude D830
  SMBIOS IdentifyingNumber: 49495G1
  SMBIOS UUID: 4C4C4544-0039-3410-8039-B4C04F354731

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.

Connected to ROOT\CIMV2 WMI namespace

Query for SELECT * FROM Win32_SystemEnclosure
  SMBIOS SerialNumber: None
  SMBIOS Name: System Enclosure
  SMBIOS SMBIOSAssetTag: None
  SMBIOS Manufacturer: To Be Filled By O.E.M.

Query for SELECT * FROM Win32_BaseBoard
  SMBIOS SerialNumber: None
  SMBIOS Product: EIN70-SAM
  SMBIOS Name: Base Board
  SMBIOS Manufacturer: INTEL Corporation

Query for SELECT * FROM Win32_BIOS
  SMBIOS SerialNumber: None
  SMBIOS Name: BIOS Date: 10/15/13 20:06:15 Ver: 04.06.05
  SMBIOS Manufacturer: American Megatrends Inc.

Query for SELECT * FROM Win32_ComputerSystem
  SMBIOS Name: GENPOSA-1
  SMBIOS Manufacturer: To be filled by O.E.M.

Query for SELECT * FROM Win32_ComputerSystemProduct
  SMBIOS Name: EIN70-SAM
  SMBIOS IdentifyingNumber: None
  SMBIOS UUID: 03000200-0400-0500-0006-000700080009
Shawanda answered 12/7, 2015 at 15:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.