Hello,
I am making an application that disable USB storage device on one PC. i have edited the registry to do this.
SYSTEM\\CurrentControlSet\
\Services\
\USBSTOR\\
set the value of start to 4.
What i would like to do is that when the usb is disabled and the user inserts a usb storage device a dialog will prompt asking a password to enable the usb.. I am encountering a problem on how will i detect the usb storage device insertion. I have used the DBT_DEVICEARRIVAL then im checking DBT_DEVTYP_DEVICEINTERFACE
if it is a USB storage. but when the usb is disabled in the registry it will not enter my code on DBT_DEVICEARRIVAL.
Any idea on how will i detect USB storage when the USB is disabled in the registry. the purpose of this is to prompt the user to input a password to enable the registry key.
If there are other methods rather than using registry key it will be great and it will be highly appreciated.
Start Free Trial