Raheel Khan
Raheel Khan

Reputation: 14787

Uniquely identify a hard drive

I am working on a directory tree compare tool that can work across multiple computers communicating with other instances via TCP.

The tool works well but so far has been relying on drive letters and labels that can be changed by the user. Removable drives is another issue.

I want to identify each drive by some kind of unique serial number (possibly the manufacturer code). How can this be achieved with .NET?

EDIT: Please note that I am not interested in identifying uniqueness of the system on which this app is running, just the uniqueness of the hard drives installed.

Upvotes: 2

Views: 494

Answers (1)

Praveen Paulose
Praveen Paulose

Reputation: 5771

You may have to look for better options than the manufacturer code. Because you can have drives / partitions on the same hard disk. You could have a C: and a D: on the same drive, which means the same manufacturer code. This will result in a non-unique identification.

Upvotes: 1

Related Questions