Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# .NET
Hello friends,
 
At first it may seems it is very easy question and some body may be trying to give me advice to try Google…..it may be…….
 
But for me it is very hard I have try Google and can’t find any good solution…
What should be is…..
Just want to get Serial no of Hard Disk or Hard Drive….using C#
Please read carefully, serial no of Hard Disk, But not Serial no of Volume of Hard Disk (e.g. C, D, E..etc).
 
For getting serial no of volume of hard disk I have found solution on net and its work well but problem is with Getting serial no of Hard Disk………
Some body may trying to make this question as possible copy of Below question or may suggest link of that question….But it is not
 
And not any below question provide good solution for this problem in C#....
1. http://stackoverflow.com/questions/4559700/how-to-get-hard-disk-serialnumber-in-c-no-wmi
2. http://stackoverflow.com/questions/3139276/how-to-retrieve-hdd-firmware-serial-number-in-net
3. http://stackoverflow.com/questions/677251/hdd-serial-number
One article (in C#) at link, it gives every parameter nicely other than serial no…
How to Retrieve the REAL Hard Drive Serial Number
You can read discussion at below that article to conform………
Posted 15-Apr-11 3:03am
Edited 15-Apr-11 3:35am
v4
Comments
Dalek Dave at 7-Nov-11 3:33am
   
Actually, that is a fairly good question, and well set out.
Pritesh Aryan at 11-Nov-11 2:04am
   
Thank you so mcuh Dalek Dave for your compliment.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 7

Great work!Thank for your solution!!!
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Or have a look at this article about WMI that gives you a lot of info including the harddisk serial.
How To Get Hardware Information (CPU ID, MainBoard Info, Hard Disk Serial, System Information , ...)[^]
 
Good luck!
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Hello friends............
this is the final solution............
 
Get Physical HDD Serial Number without WMI[^]
 
write this much code..........
DriveListEx diskInfo = new DriveListEx();
            diskInfo.Load();
            string serialNo = diskInfo[0].SerialNumber;
Dont't forgot to add reference to the "DriveInfoEx.dll".....
  Permalink  
v3
Comments
avigodse at 15-Apr-11 11:38am
   
But, this actually gives drive volume serial number, which is tend to change if formatted or partitioned.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 /\jmot 230
1 Zoltán Zörgő 210
2 Peter Leow 145
3 Sergey Alexandrovich Kryukov 115
4 _Asif_ 108
0 Sergey Alexandrovich Kryukov 9,353
1 OriginalGriff 6,881
2 Peter Leow 4,577
3 Zoltán Zörgő 4,129
4 Richard MacCutchan 2,882


Advertise | Privacy | Mobile
Web03 | 2.8.150129.1 | Last Updated 29 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100