Hey guys,

I'm looking for a way to obtain an SSD serial number and I'm not interested in the volume serial number.

Thanks in advance,

Jeff

Depends on ye' operating system. If windows OS, you can use the <windows.h> library to populate attributes of the Win32_DiskDrive Class:

http://msdn.microsoft.com/en-us/library/aa394132%28v=VS.85%29.aspx

I believe the specific attribute ye' are looking for is string SerialNumber;

SerialNumber

Data type: string
Access type: Read-only

Number allocated by the manufacturer to identify the physical media.

Example: WD-WM3493798728

Windows Server 2003, Windows XP, Windows 2000, and Windows NT 4.0: This property is not available.

There doesn't appear to be an attribute specifically for a SSD serial, and there doesn't appear to be a Win32_SolidStateDrive Class.. not sure how windows would handle this situation. It might display all parts of the serial together, in which case you can of course parse the desired info from the string.

for a solid state drive this doesnt work tho

According to this link, it's possible the info ye' require might actually reside in the Win32_PhysicalMedia class:

class Win32_PhysicalMedia : CIM_PhysicalMedia
{
  string   Caption;
  string   Description;
  datetime InstallDate;
  string   Name;
  string   Status;
  string   CreationClassName;
  string   Manufacturer;
  string   Model;
  string   SKU;
  string   SerialNumber = NULL;
  string   Tag = NULL;
  string   Version;
  string   PartNumber;
  string   OtherIdentifyingInfo;
  boolean  PoweredOn;
  boolean  Removable;
  boolean  Replaceable;
  boolean  HotSwappable;
  uint64   Capacity;
  uint16   MediaType;
  string   MediaDescription;
  boolean  WriteProtectOn;
  boolean  CleanerMedia;
};
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.