How can I uniquely identify a USB key from C#?

后端 未结 3 1779
夕颜
夕颜 2021-02-10 00:40

I\'d like to be able to detect when a USB key is inserted. Furthermore, if I can distinguish between USB key A and USB key B then I am in even better shape. Lastly, if I can u

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-10 01:07

    You need to retrieve the key's Hardware ID.

    I don't see how to subscribe to the plugged-in event, but you could always have the user click a button too.

提交回复
热议问题