How could I know when an external device was connected to my computer and, as a result, ask for a password to be accepted?
How could I know when an external device was connected to my computer and, as a result, ask for a password to be accepted?
To detect USB through c # there are several ways you can help with WMI
Detect Insertion and Removal of USB Drive C #
or you could help with libraries
A USB Library to Detect USB Devices
which will make easier the manipulation of the usb and its actions
Some people use the handlers of the operating system api
Detecting USB Drive Removal in a C # Program
as you will see possibilities to work with the usb there are many and varied
Now the issue is how to prevent the device from being active while waiting for confirmation