Discussion Locked

determining Hard disk serial number

0 helpful
11 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

hello friends,
i m very much confused regarding serial number of a harddisk. All i want is to retrieve harddisk unique serial number. I got decent solution regarding volume serial number, but i dont want that coz every time a fat table has been modified , this volume identification is also vulnerable to change.
mainly i want to fetch harddisk serial number using windows mode of programming. i dont desire any realtime dos mode solution. Tell me about some techniqes if you have, about this part.
thank you in advance.

11 replies

by peter ritchie

The volume serial number is the only "serial" number you can retrieve from a hard disk. As you may have already found out, GetVolumeInformation() is used to retrieve that information.

I know of now stardard way to retieve any other "serial" information from or about a hard disk.

by mike (from canada)

I have never seen a windows program find out a Hard drive serial number, but you could try the following.
#1) Create a batch file that contains the following: dir c:\*.*>c:\serial.no
#2) now in your programming language, make it run the batch file minimized and then play with "c:\serial.no". that contains the serial number of the hard drive.

by sergey kovzik

you have to work with hardware at low level. I've read information from internal HDD controller. And that is sad - not all HDDs has S/N inside, sometimes they are same. you need to check DDK for Win9x/NT. Basically you'll need to write .vxd access driver and will communicate with it from your program. I can sent an example.

As another easier solution - try to read BIOS information - HKEY_LOCAL_MACHINE\Enum\Root\*PNP0C01\0000 - here is manufacturer, bus type, CPU and other info about PC.

Sincerely, Sergey
Brainbench MVP for Win98 Administration

This discussion is closed to new replies.