Re: Get HDD Serial with .Net
Yes. This gives only the serial no of the relevent partition. I also want to know how to get the HDD serial no.
Thanx
Re: Get HDD Serial with .Net
Quote:
Originally Posted by Chathura
Yes. This gives only the serial no of the relevent partition. I also want to know how to get the HDD serial no.
Thanx
WMI is indeed the way to go. Take a look at the Win32_DiskDrive class. I did this myself a while back and I seem to recall that I had to use the Win32_PhysicalMedia and Win32_DiskDrivePhysicalMedia classes too. Just be aware that if a system is running a RAID array then you will not be able to get the individual serial numbers as the entire array is seen as a hard drive. I never did find a way around that.