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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hard drive serial number 2

Status
Not open for further replies.

dmarquesdrc

Technical User
Aug 30, 2006
113
0
0
PT
Hi,

Is there any way (a command or something else) to read serial number of the hard drive installed on the pc.

Thanks.
 
Hi,

But this is a software that we have to install.
The idea is to be possible over telephone to tell a costumer to check serial number of the hard drive, without installing any software.

Thanks.
 
Depending on The Drives manufacturer, some might have the serial number as part of the Device Manager entry. But not all do.

Windows doesn't read the serial number of the hard drive.

They'll have to look at the label on the hard drive itself.

Otherwise, the best you can do is get the Make and Model off of Device Manager.





----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
You can also get that info in BIOS, not the serial #, but the exact mosel #. I don't know if HDD makers code the serial # onto the drive platters. If it's hard to see the drive SN while in the case taking a high-res digital picture may help...with the machine powered off!

Tony
 
Click Start > Run
Type wbemtest
Connect
Replace root\default with root\cimv2 then press connect
Click Open Class
Type win32_physicalmedia and click ok
In the Object Editor, click Instances on the right hand side
You will have returned all instances of harddrives installed on the computer. Select the one you wish to examine and double click it.
In the middle box, scroll down to the property "Serial Number", on the right, you will see the data held on the disk for that property.

Hope this helps



Neil J Cotton
Technical Consultant
 
ncotton

Amazing trick! Really drills down into Windows hardware, I like that, but all my hard drives returned "null" under "Serial Number". Is this the disk or Windows? Or did I stop one step short of Nirvana?

Tony
 
You did open the INSTANCES and SELECT the drive.

The instance window is exactly the smae as the template window (the step before) except the template window contains no actual data, and has the DERIVED and INSTANCES buttons, and the instance window has DATA (hopefully), and has REFERENCES and ASSOCIATORS type.

Just do it again and make sure you are looking at the actual instance of the hard drive.

WMI is a Windows APO that grabs data from everywhere, including straight from hardware. HOWEVER, this data is entirely up to the manufacturer, there is no need to publish this data, so alot of the time, things come back null, because the current CIMV2 model has such an expanse of data templates, that most of it is never used. For example, in a different namespace (that the thing you changed before CONNECT", there is a class called chasis, which takes the dimentions of the physical tin of your case.

If the data is not displayed (NULL) then either the hardware manufacturer (the disk mnfr) did not include this data in the SMON controller, OR, the WMI provider returned an invalid data (possibly if it is a Japanese mnfr (most likely) there may be an eroneous 16bit character in the string) etc.

Basically it is not a PROBLEM, but there is no other way you can do it without opening the case and looking at it yourself.

Hope the WMI tutorial has been helpful though. If you want any more details on WMI, or want to play with it a bit more and need some guidance, just contact me. Email should be in my profile.

Neil J Cotton
Technical Consultant
 
Star for you ncotton. I never knew about this Management Instrumentation Tester. Its pretty interesting, and provides lots of info.

But as you said its up to the manufacturer to provide that information. I have 3 hard drives in this Machine, and i get Serial numbers for 2. The last one a Maxtor drive, doesn't provide that information.

Also There is a fourth entry which also shows null, which I'm guessing corresponds to the CD drive, which also doesn't provide the serial number.



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Indeed Neil rare to find some totally new stuff like this, unfortunately my drives are all still "null" Seagate 7200.10's in RAID1, but that does not diminish the value of the info. It is pleasure to award you a star for this info.

Tony

 
when looking for info like this, you have to deminish some logic and think outside the box, like there is a class win32_DiskDrive, but there are also some aditional ones like PhysicalMedia, PhysicalDevice, DiskDrivePhysicalMedia, StorageDevice.

Not all classes exist on all machines, it depends which ones are instanciated when the hardware is installed. Alot are standard, defined by windows, but if you buy a pre-built machine from a mainstream manufacturer, alot of the time, especially for business PCs, an extra eprom chip is put on the MoBo to create, and populate aditional classes, this is mainly for custom network-wide manageability tools.

Another little tip... if you don't know the class you are looking for.....

Click Start > Run
Type wbemtest
Connect
Replace root\default with root\cimv2 then press connect
Click "Enum Classes"
Leave the Superclass name blank, and select the "Recursive" radio button and hit "OK".
All the classes are listed and you can search and select to open straight from there, then as before, open, select the instance, and voila.


ALSO

A class, such as "Win32_DiskDrive", is like any other object oriented, class driven process, just like OOProgramming. It utilises Inheritence. For example, the Win32_DiskDrive does not query the disk for the Disk's name, it inherets it from Win32_PhysicalMedia, along with many other properties, it then adds it's own properties which are dependent to the class, these may then be inhereted further down the chain by another class such as Win32_LogicalDisk, which looks at partitions (so Windows Drives - C:\ and D:\ being on the same physical disk, but being seperate logical disks). There PhysicalDevice name is the same for both logical drives, but there is no point querying the hardware twice, so it inherets the data from the natural superclass.

Hope this helps

Neil J Cotton
Technical Consultant
Anix Group Ltd
 
I believe you can boot up off of a dos disk and run fdisk and it'll show you the serial number (fdisk doesn't appear to be installed with XP).
I remember back in my younger days, I had software that was tied to the serial number (for anti-piracy purposes) so I found a utility that would change the serial number of the drive.
Sneaky!
Here's an app that lets you set it to whatever you want:

And here's an app to view it...or so it says:
 
I may have overcomplicated my answer.
Open a command prompt and type dir.
Like so...

C:\Documents and Settings\seismo>dir
Volume in drive C is c_drive
Volume Serial Number is 44B7-5F13

Directory of C:\Documents and Settings\seismo

05/18/2007 01:28 PM <DIR> .
05/18/2007 01:28 PM <DIR> ..
 
Unfortunately, the Volume Serial Number and the Hard Drive serial number are different from each other

The Volume serial is useless in the context the OP was asking.

The Volume serial number, is just a number Windows assigns to the volume or partition. totally independent of the actual hard drive serial number.


As an example my hard drive's serial number from the label is:

3JV5HY26

While the volume serial number is: 456F-1C79 using the DIR method.


I think short of reading of the Label, the Management console is the best bet, although mfg's might not include that information.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top