How to get the oem serial number of a HD?

Hi. I need to get the hardware (not msdos!) serial number of a hard disk, either IDE or SCSI, i know testing software that show this number (the same printed on the cover of the disk), but i can find the routine (any language, asm better) Any help?
Thank you
Who is Participating?
RoadWarriorConnect With a Mentor Commented:
This little dos utility does it for me, returns serial number and other drive info,

to get the output saved to a file, use the dos redirection character, at a dos prompt enter...

dugide >myfile.txt


Road Warrior.
My name is MudSystems EngineerCommented:
EZ-DRIVE can do that, can give you model, serial and much more.
This is a program that can tell you HD serial # and lots more, it has a 14 day trial period to try it out.
That also has source in C included by the way !!
Wonderful code. Now can you please tell me how to get it to work under Windows 98 / 98.

I have tried several _inp and _outp enabling dlls and liberaries to over the ring 3 limitation but they do not work always wrong values coming from the ports.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.