Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hard Disk serial number application

Status
Not open for further replies.

skipagency1

Programmer
May 21, 2004
7
IT
Hi I found a nice free application for reading the hardware serial number (the hardware id, not the serial number created form the operating sistem)

It's located on
It's better than using the GetVolumeInformation or similar but I try to launch it inside a VB-5 program but it does not works

I used shell and shellexecute code but I need something that really works like a dos screen.(infact typing "c:\diskid32.exe" it works perfectly)

Someone can help me please to solve this problem


thanks adn bye-bye
 
>It's better than using the GetVolumeInformation or similar

Just to establish the ground rules before commenting, why do you think it is better?
 
Hi Strongm
I mean that using GetVolumeInformation you don't obtain the phisical serial number: as you know the serial number (obtained with GetVolumeInformation) change everytime you format the hard disk and if you have many computers where the Operating sistem is installed using an image disk (tipycally in a network), the serial number is ythe same for all the computer: this mean that the serial number obtained with GetVolumeInformation is a serial numebr marked from the Operating Sistem and not from the manifacture.

This utility seems find the real phisical serial number: infact I tried it in some network computer (where the same number from GetVolumeInformation was the same) and I obtained different serial number.

So the only problem is to launch it : it's a win32 application, and I don't know how is possible to do it

thanks and regards
 
Ok - it's worth pointing out a number of things:

1) There is no agreed standard for the manufacturer's serial number - which leads to the fact that there is no requirement for them to be unique (although it is fair to say that they probably are)

2) Only IDE drives have hardware serial numbers (which makes DiskID's author's promise to support SCSI drives ina future release rather problematical...)

3) Direct access to hardware in NT/XP/W200x is protected against. Most of the serial number techniques can result in the PC locking up (indeed DiskId's author specifically warns that this might happen)

Given the above, do you really feel it is something worth bothering with?
 
The hard drive serial number is encoded into the firmware in each physical hard drive and so the code would be different from manufacturer to manufacturer. If you are looking for a unique number, your best bet is using WMI to get the CPU Id of the machine.

Like Strongm says, using a utility DiskID can very likely lock your system up. It's just really not a good idea to go poking around in this area seeing as how each manufacturer uses different algorythms for their firmware information, you could even DAMAGE your hard drive's boot sector, if you don't know what you're doing (and sometimes, even if you do).


John Vogel
john@thecompuwizard.com
 
Unfortunately CPUID can be turned off (generally by default). There is an interesting article on IA32 architecture here:


which details processor serial number usage. Scroll down to Standard level 0000_0003h to find it.

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
I have a question in order to get the cpuid wouldn't you have to access the bios - which I thought XP/2K disallowed access to

Could someone clear this up for me?

%, 2004
 
Thanks to everybody for the answer

I tested the application on different sistem and it works: for the moment I will use it, if will meet problem I will change

bye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top