I have been looking for a solution to this for several weeks. I am looking for a way in which I can uniquely identify any media connected to a Windows PC. Information carriers in particular. These can be internal hard drives, external hard drives, flash drives, SD cards, smartphone storage, etc. No optical media.
Basically, what I want to do is indicate some unique line that is tied to a specific storage device, so at any time when the storage device is connected again, regardless of the drive letter, it can be automatically detected.
Problems I encountered:
- Not every storage device has a serial number.
- When SD cards are accessible through a card reader, the information available through WMI through the
ManagementObjectSearcher class refers to the card reader, not the media file.
There seem to be 4 basic properties that can return unique information, but not always. SerialNumber , Caption , PNPDeviceID , Signature
Of course, there must be SOMETHING that Windows does to track such storage devices. Any ideas?
user1003916
source share