I use WinSCard to list all readers, which gives me a list like this:
ASK RDR4x7 0
SCM Microsystems Inc. SCR3320 USB Smart Card Reader 0
SCM Microsystems Inc. SCR3320 USB Smart Card Reader 1
SCM Microsystems Inc. SCR3320 USB Smart Card Reader 2
Which is great, but I have no clue which name belongs to which card reader.
Where do these names come from? How are they constructed?
What I've found up until now: in the registry, there is a HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
key. Under this key, you can find the subkey which matches the card reader's "service" (which I found by querying the WMI registry). For example: the service for the SCM Microsystems Inc. SCR3320 USB Smart Card Reader
readers is SCR3XX2K
.
This subkey (SCR3XX2K
) has another subkey Enum
, which has multiple interesting values:
Count
: DWORD, the number of readers connected0
,1
,2
: STRING, hardware Device ID
I guess these are the numbers appended to the 'friendly names', but I can't figure out how the name string is constructed. I need this to map hardware Device ID's (which I get through WMI) to their friendly name.
So, what's the pattern used to create a 'friendly name' for a smart card reader, and where do the values come from?