To 'Enable/Disable' USB port programmatically RRS feed

  • Question

  • Hello,

    I have a requirement where in I need to Enable/Disable the USB port pro grammatically.

    The solutions which I found online are saying to modify the registry

    "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR\\Start" value from 3 to 4 which disables the USB port on windows system.

    But this can be modified by the user if he has the permission to change the registry value.
    I want to 'Enable/Disable' the USB port with my application and that cannot be changed by user at any point of time.

    Is there a way to achieve this at driver level?

    Please suggest me some possible solutions on this.

    Thanks in Advance.



    Wednesday, July 10, 2013 7:09 AM


  • No, you can't do this your app and then prevent an admin from changing the disabled state. There are group policy settings that can prevent things like using USB removable devices that work at a higher level. What bigger problem are you trying to solve?

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, July 10, 2013 2:18 PM