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

1

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?

Shahar

Posted 2019-11-13T15:04:49.560

Reputation: 336

1Why not just go back to the restore point you made before messing around with the drivers? – Eugen Rieck – 2019-11-13T15:14:17.613

1Try Device Manager, locate USB controllers, open that section and (a) make sure no yellow or red marks, and then (b) update all the drivers, restart and test – John – 2019-11-13T15:14:31.177

1Did you try the command devmgmt.msc to see if device manager loads? – Moab – 2019-11-13T15:24:05.937

@EugenRieck I check it and sadly I don't have any restore point... I didn't make one, I didn't think that this will disable all input devices in the tablet... (I didn't uninstall or delete anything, I just disabled the driver) – Shahar – 2019-11-14T00:35:02.513

@John, I tried running Device Manager, it didn't work. – Shahar – 2019-11-14T00:38:46.247

@Moab, I also tried running devmgmt.msc, it doesn't work when Windows is in command prompt only safe mode, and this is the only mode that works – Shahar – 2019-11-14T00:39:19.630

A Windows 7 Repair Install from the Windows 7 DVD will normally fix this issue. I have done these before – John – 2019-11-14T01:44:38.880

Answers

3

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

Señor CMasMas

Posted 2019-11-13T15:04:49.560

Reputation: 939

This page may be helpful when using devcon>>>>>https://www.maketecheasier.com/manage-windows-device-drivers-command-prompt/

– Moab – 2019-11-14T02:52:53.903

Also where do you copy the devcon file to? System32? – Moab – 2019-11-14T02:58:04.247

In the current directory (wherever that might be).. System32 will work but I try not to put anything there. – Señor CMasMas – 2019-11-14T16:20:36.657

1

You may use the Microsoft utility of Windows Device Console (Devcon.exe) to enable and disable drivers, and may create icons for these commands on the desktop.

This utility is part of the Windows Driver Kit, Visual Studio, or the Windows SDK for desktop apps. To avoid downloading these heavy products, see the post DevCon-Installer.

To see an example of using Devcon to enable a device, see the post DevCon Enable.

Examples are:

devcon /r enable "device full name"
devcon /r enable *DVD-ROM*
devcon /r enable =printer

For more information see the SS64 article about devcon.

harrymc

Posted 2019-11-13T15:04:49.560

Reputation: 306 093

Yes but can they install devcon in safe mode from the command prompt? – Moab – 2019-11-14T02:50:35.973

@Moab: Devcon is a simple .exe. – harrymc – 2019-11-14T06:18:51.990

I get that, but how do you install it with only the cmd prompt available and where does it go? System32 folder? – Moab – 2019-11-14T12:30:13.890

@Moab: The .exe will work from anywhere without installation. – harrymc – 2019-11-14T13:24:53.373