Windows – How to enable USB device manager in Windows 10 from command-line or Registry

command lineusbwindows 7

I have disabled one of the USB device drivers from windows 10 Device manager in my tablet (to check something).

It was the main USB device driver of Windows.
This caused all USB devices to stop working, which is what I expected.

The problem is that it also disabled the touch screen.
It means that Windows doesn't have any user input enabled.

I can start Windows in Command prompt mode and everything works, but when I start windows in safe mode or normal mode, everything is still disabled.
I also can't load the Device manager, so I enable it back.

How can I enable the USB device drivers from the command-line or the registry editor?

Best Answer

I have one way that is worth a try if you are savvy enough. Be aware that playing with command line tools that manipulate the state of device drivers is inherently more dangerous than clicking on things in the GUI.

From the command line, you can try to use the Windows Management Interface (WMI) to re-enable your devices. If you can't get to it in command prompt mode, perhaps you can access it from another machine using the same method. WMI is intended to be run from other machines anyway. If you can't do that.. I have one more thing to try at the bottom of this post.

From the command line, we will be using a tool called WMIC.exe. To try from the network, look at the command line options for WMIC.

Run the following command

wmic path Win32_PnpEntity where "Status='Error'" get /value

You will see one or more of something like this:

Availability=
Caption=USB Root Hub (USB 3.0)
ClassGuid={36fc9e60-c465-11cf-8056-444553540000}
CompatibleID=
ConfigManagerErrorCode=0
ConfigManagerUserConfig=FALSE
CreationClassName=Win32_PnPEntity
Description=USB Root Hub (USB 3.0)
DeviceID=USB\ROOT_HUB30\4&3A53011&0&0
ErrorCleared=
ErrorDescription=
HardwareID={"USB\ROOT_HUB30&VID8086&PID9D2F&REV0021","USB\ROOT_HUB30&VID8086&PID9D2F","USB\ROOT_HUB30"}
InstallDate=
LastErrorCode=
Manufacturer=(Standard USB HUBs)
Name=USB Root Hub (USB 3.0)         <-- **** look at THIS one ****
PNPClass=USB
PNPDeviceID=USB\ROOT_HUB30\4&amp;3A53011&amp;0&amp;0
PowerManagementCapabilities=
PowerManagementSupported=
Present=TRUE
Service=USBHUB3
Status=Error
StatusInfo=
SystemCreationClassName=Win32_ComputerSystem
SystemName=BOBSYERUNCLE

Note that I have singled out the Name= property.
We don't have to use "Name" persay.. but we do need a property to key off of.

Look through the entries until you find the device we want to enable and a property you want to use. For my example.. it will be Name.

* Now run this: (replacing Name=xxxxx with your property and value) *

wmic path Win32_PnpEntity where "Name='USB Root Hub (USB 3.0)'" call enable

Hope this works because it is easy.

If it doesn't, there is ALWAYS devcon.exe from the WDK. It will do the trick but may require some work to figure out how to use it. This tool is DANGEROUS. Be careful.

To get devcon.exe (without loading the entire WDK): Download this cab file directly from Microsoft.

Extract the file "filbad6e2cce5ebc45a401e19c613d0a28f" and rename it to devcon.exe. I used 7zip to do this.

DevCon.exe is documented here

Related Question