Associating FriendlyNames from the registry with a USB drive letter

I am writing an application that allows you to sync with USB storage devices, and I would like to display FriendlyNamefor devices that can be found in the registry inHKLM\SYSTEM\CurrentControlSet\Enum\USBSTOR\

I use GetLogicalDrivesto get a list of available devices GetDriveTypeto filter with DRIVE_REMOVABLEand GetVolumeInformationto get the volume name and serial number.

I would also like to get FriendlyNamefrom the registry by associating entries USBSTORwith a drive letter so that I know which entry is which drive.

+3
source share
1 answer

, . . . . SetupAPI API

+3

Source: https://habr.com/ru/post/1733913/


All Articles