Having a USB port automatically disabled upon devide disconnect

How can I have a USB port automatically disabled upon device disconnect?


Microsoft MVP
Staff member
Premium Supporter
Microsoft MVP
Three main ways of disabling USB ports - in the BIOS, in Device Manager and via the Registry. The first two cannot be managed automatically, the Registry possibly and could be achieved by use of a script (the key of interest is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor ) but there would remain the problem of re-enabling as and when required.

This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.