3

As the question states I need some way of getting a unique ID for each of the drives attached to my PC.

The reason behind this is that if i store the location of a file in a DB and I want to retrieve it at a later stage I wont always get the file since the drive letters change depending on the number of drives plugged in.

RC1140
  • 8,423
  • 14
  • 48
  • 71

1 Answers1

0

Each harddisk/storage device has a serial number.

You need to query that value: Read USB Device Serial number in C#

Community
  • 1
  • 1
Amirshk
  • 8,170
  • 2
  • 35
  • 64
  • This is correct, but you probably don't need a hardware ID for this application. A volume serial number should be sufficient for locating a specific file. – finnw Feb 03 '10 at 16:58