Friday, July 31, 2009

How to disable and enable USB port using visual C#?

Hello everyone


I'm writing a program using visual C# language, I need to control the USB port programmaticlly, I need any hint or idea about how to do it?? thanks in advance.

How to disable and enable USB port using visual C#?
I believe you would have to do so via the registry. The key should be HKEY_LOCAL_MACHINE\SYSTEM\


CurrentControlSet\Services\


USBSTOR\Start





and I believe the corresponding key values are:





Enabled = 3


Disabled = 4


No comments:

Post a Comment