Link to home
Start Free TrialLog in
Avatar of Al_Shepstone
Al_Shepstone

asked on

Hard Drive Serial number, or motherboard serial number

How can I read the Hard Drive Serial number, or motherboard serial number into a delphi project?
Avatar of Tomas Helgi Johannsson
Tomas Helgi Johannsson
Flag of Iceland image

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

Regards,
   Tomas Helgi
Extracting the real physical serial number of hard drives, but only works under Windows XP/2000
Take a look at my code:
https://www.experts-exchange.com/questions/20950704/Making-Software-Lock-according-to-hardware-unique-information.html
Avatar of Al_Shepstone
Al_Shepstone

ASKER

I was looking for code that would work with Delphi6 using a Windows 98SE platform.
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
Printers
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.

Regards,
   Tomas Helgi
>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;
var
 p, q: pchar;
begin
 q := nil;
 p := PChar(Ptr($FE000));
 repeat
   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;
       end;
       q := nil;
     end;
   end else
     if p^ in [#33..#126, #169, #184] then
       q := p;
   inc(p);
 until p > PChar(Ptr($FFFFF));
 Result := TrimRight(Result);
end;

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


Regards
Azhdari
ASKER CERTIFIED SOLUTION
Avatar of Ivanov_G
Ivanov_G
Flag of Bulgaria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Ivanov G the link you posted answerd my question.
leave your e-mail address here. I have work it out. If you want, I will post you the code.