Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

windows - Motherboard ID - WMI C++ - Reliable?

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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 ROOTCIMV2 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 ROOTCIMV2 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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...