1

I am trying to find a way to be able to enable/disable a USB port on my computer via command prompt or powershell.

I have looked EVERYWHERE and the only possible solution I have found is by using the devcon disable command. However, when I try to use it, I always get this "Disable failed" in response.

Is there something wrong with my command, or maybe am I trying to disable the wrong device? Of course, let me know if this isn't enough information. Thanks!

C:\WINDOWS\system32>devcon find usb*

USB\VID_045E&PID_07BE\5&16B1AE89&1&7                        : USB Composite Device
USB\VID_1286&PID_204B\0000000000000000                      : Marvell AVASTAR Bluetooth Radio Adapter
USB\VID_045E&PID_07BF&MI_00\6&15943EE&0&0000                : Microsoft LifeCam Rear
USB\VID_0BDA&PID_0307\201006010301                          : Realtek USB 3.0 Card Reader
USB\VID_045E&PID_07BF\5&16B1AE89&1&8                        : USB Composite Device
USB\ROOT_HUB30\4&3A935074&0&0                               : USB Root Hub (USB 3.0)
USB\VID_045E&PID_07BE&MI_00\6&2299716&0&0000                : Microsoft LifeCam Front
USBSTOR\DISK&VEN_REALSIL&PROD_RTSUERLUN0&REV_1.00\0000      : SDHC Card
USB\VID_045E&PID_07DC\034478250254                          : USB Input Device
USB\VID_046D&PID_C52B\5&16B1AE89&1&1                        : USB Composite Device
USB\VID_046D&PID_C52B&MI_02\6&733402B&0&0002                : USB Input Device
USB\VID_046D&PID_C52B&MI_01\6&733402B&0&0001                : USB Input Device
USB\VID_046D&PID_C52B&MI_00\6&733402B&0&0000                : Logitech USB Input Device
13 matching device(s) found.

C:\WINDOWS\system32>devcon disable "@USB\ROOT_HUB30\4&3A935074&0&0"

USB\ROOT_HUB30\4&3A935074&0&0                               : Disable failed
No matching devices found.
Taylor
  • 23
  • 1
  • 3
  • Of course, if you know of a different way to disable a usb port with command, please let me know! – Taylor Mar 15 '18 at 22:39

2 Answers2

1

To help anybody finding this topic, I encountered this failure on WIN7 64bits. I solved it with a devcon 64bits (69kB) instead of devcon 32bits (55kB). See also

delphintipz.blogspot.com/2012/07/disable-failed-no-devices-disabled.html

0

I had the same problem with Windows 10 and I solved when change the devcon executable file privileges. To work devcon.exe must have administrator privileges.

You can find how to do it here.

ThP...
  • 5
  • 6
  • Welcome to Stack Overflow! Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the external resource is unreachable or goes permanently offline. Links to other websites should always be _helpful_, but avoid making it _necessary_ to click on them as much as possible. – Fastnlight Oct 28 '22 at 16:01