Serial Number Of The Hard Disk

How to Find Serial Number of Hard Drive in Windows Information Sometimes abbreviated as Serial No., SN or S/N, a serial number is a unique number assigned to the PC by the OEM (Original Equipment Manufacturer) used for identification and inventory purposes. To find Hard Disk Serial Number in Windows 10, do the following. Open an elevated command prompt. Type or copy-paste the following command: wmic diskdrive get Name, Manufacturer, Model, InterfaceType, MediaType, SerialNumber. In the output, you'll see the model, name, and serial number listed for the installed hard drives.

  1. Volume Serial Number Hard Disk
  2. Serial Number Of The Hard Disk Time
  3. Serial Number Hard Disk Windows 7
  4. Serial Number Of Seagate Hard Disk
  5. Serial Number Paragon Hard Disk Manager 16 Basic
Active4 months ago
Disk

I want to get hard disk serial number. How I can I do that?I tried with two code but I am not getting

Volume Serial Number Hard Disk

In this one I am not getting any Unique Serial number.
And Second one is

Here I am getting VolumeSerialNumber. But it is not unique one. If I format the hard disk, this will change. How Can I get this?

Muhammad Saqib
1,2701 gold badge26 silver badges40 bronze badges
JobyJoby
1741 gold badge2 silver badges10 bronze badges

10 Answers

Hm, looking at your first set of code, I think you have retrieved (maybe?) the hard drive model. The serial # comes from Win32_PhysicalMedia.

Get Hard Drive model

Get the Serial Number

Hope this helps :)

hims056
24.2k24 gold badges93 silver badges120 bronze badges
Hard drive number
SprunthSprunth

I have used the following method in a project and it's working successfully.

you can call the above method as mentioned below,

If you need a unique identifier, use a combination of these IDs.

SencySency
1,1006 gold badges32 silver badges54 bronze badges
huoxudong125huoxudong125
1,0662 gold badges15 silver badges38 bronze badges

Use 'vol' shell command and parse serial from it's output, like this.Works at least in Win7

PeksuPeksu
Tot Zam
4,5234 gold badges35 silver badges56 bronze badges
Brahim BourassBrahim Bourass

The best way I found is, download a dll from here

Then, add the dll to your project.

Then, add code:

Then, call the hard disk ID from where you need it

Note: go to properties of the dll in explorer and set 'Build action' to 'Embedded Resource'

Serial Number Of The Hard Disk Time

Brian Webster
21.3k43 gold badges132 silver badges209 bronze badges
Azhar BandriAzhar Bandri

Serial Number Hard Disk Windows 7

Below a fully functional method to get hard disk serial number:

Anjan KantAnjan Kant
lxg
8,92211 gold badges33 silver badges54 bronze badges

Serial Number Of Seagate Hard Disk

Denis IlyushchenkoDenis Ilyushchenko

Here is a solution using win32 api and std string in case you need your application to run on a OS with no CLR. I found it here on github.

Serial Number Paragon Hard Disk Manager 16 Basic

IjonTichyIjonTichy

In case you want to use it for copy protection and you need it to return always the same serial on one computer (of course as far as first hdd or ssd is not changed) I would recommend code below. For ManagementClass you need to add reference to System.Management. P.S. Without 'InterfaceType' and 'DeviceID' check that method can return serial of random disk or serial of USB flash drive which connected to pc right now.

random onerandom one

Not the answer you're looking for? Browse other questions tagged c#hard-drive or ask your own question.