Hard Drive Serial number, or motherboard serial number

Posted on 2004-04-20
Medium Priority
Last Modified: 2009-03-09
How can I read the Hard Drive Serial number, or motherboard serial number into a delphi project?
Question by:Al_Shepstone
  • 2
  • 2
  • 2
  • +3
LVL 26

Expert Comment

by:Tomas Helgi Johannsson
ID: 10869403
Check out this component : MiTeC System Information Component v.8.6.2 at Torry : http://www.torry.net/news.php?id=26&w=2

   Tomas Helgi
LVL 12

Expert Comment

ID: 10869869
Extracting the real physical serial number of hard drives, but only works under Windows XP/2000
Take a look at my code:
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 10875751
I was looking for code that would work with Delphi6 using a Windows 98SE platform.
LVL 26

Expert Comment

by:Tomas Helgi Johannsson
ID: 10876132
Well the component I mentioned works with D5,D6 and D7.
Here is the list of what computerinfo you get.

Registered organization, owner
Time Zone info
Machine name, IP address, MAC Address
SMBIOS/DMI enumeration
Last boot date and time, Boot time
CPU architecture, type, active mask, count, level, revision, vendor, id, speed,
OS version, build number, platform, CSD version, version name, user name, serial number
Locale Information
DVD Region, folders
Graphic adapter chip name, dac, memory, screen width and height, color depth, modes
Sound card name, WaveIn, WaveOut, MIDIIn, MIDIOut, AUX, Mixer device name
Memory info, allocation granularity, min.and max.application address
Disk info, file system, controllers
BIOS name, copyright, extended info, date
Video BIOS version and date
Network adapter, protocols, sevices, clients
Winsock info
BDE, ODBC, DAO, ADO, ASPI, DirectX, .NET, OpenGL, MSIE information
Device overview (like Device Manager)
Win9x resources
Running process enumeration
Installed software enumeration
Startup runs enumeration
Internet settings
Monitor detection.
USB devices enumeration
Component showing CPU usage.
XML reports and Report Viewer.

   Tomas Helgi

Expert Comment

by:Amir Azhdari
ID: 10878391
>I was looking for code that would work with Delphi6 using a Windows 98SE platform.

try this function , it'll work in win98SE

function GetBiosInfoAsText: string;
 p, q: pchar;
 q := nil;
 p := PChar(Ptr($FE000));
   if q <> nil then begin
     if not (p^ in [#10, #13, #32..#126, #169, #184]) then begin
       if (p^ = #0) and (p - q >= 8) then begin
         Result := Result + TrimRight(String(q)) + #13#10;
       q := nil;
   end else
     if p^ in [#33..#126, #169, #184] then
       q := p;
 until p > PChar(Ptr($FFFFF));
 Result := TrimRight(Result);

procedure TForm1.Button1Click(Sender: TObject);
 Memo1.Lines.Text := GetBiosInfoAsText;

LVL 12

Accepted Solution

Ivanov_G earned 320 total points
ID: 10899855

// this code reffer to Volume serial number - the logical partition
  VolumeSerialNumber: DWORD;
  MaximumComponentLength: DWORD;
  FileSystemFlags: DWORD;
  SerialNumber: string;
  SerialNumber := IntToHex(HiWord(VolumeSerialNumber), 4) +
                  '-' +
                  IntToHex(LoWord(VolumeSerialNumber), 4);

   If you want to get the physical HDD serial by manifacturer look here :

Author Comment

ID: 10916773
Thanks Ivanov G the link you posted answerd my question.

Expert Comment

ID: 11087793
leave your e-mail address here. I have work it out. If you want, I will post you the code.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
This video tutorial shows you the steps to go through to set up what I believe to be the best email app on the android platform to read Exchange mail.  Get the app on your phone: The first step is to make sure you have the Samsung Email app on your …
Suggested Courses

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question