Link to home
Start Free TrialLog in
Avatar of ThomasReimann

asked on

Disabling a device with Devcon.exe

I need to disable a USB device in command line on Windows 7 Ultimate x64.

I've downloaded devcon.exe from here:

When I start the 64bit executable I get this:

This version of C:\Work\devcon.exe is not compatible with the version of Windows
 you're running. Check your computer's system information to see whether you nee
d a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the so
ftware publisher.

When I start the 32 bit executable it works.

devcon Usage: devcon [-r] [-m:\\<machine>] <command> [<arg>...]
For more information type: devcon help

I've tried some commands like devcon classes and it seems to work.

Now I want to disable a USB device.

the Hardware id is USB\VID_0BC7

But devcon disable *USB\VID_0BC7* gives:

C:\Work>devcon disable *USB\VID_0BC7*
USB\VID_0BC7&PID_0006\5&2093BC86&0&2                        : Disable failed
No devices disabled.

UAC is off.

Disabling/Enabling this device in device manager works.

I need to get the disable working. An alternate way (without devcon) to disable a USB device by command line will also be accepted.
Avatar of Bill Bach
Bill Bach
Flag of United States of America image

I've not used DEVCON before, but an obvious solution comes to light -- when you spawn the CMD window, right-click it and select "Run as Administrator", which should provide elevated privileges.  Many command-line applications won't spawn a UAC window -- they will just fail.

I think the fact that the x64 version wouldn't run might be a clue here, too.  What if you run the x64 version from the Start/Run command line, instead of from a Command Prompt?
Avatar of ThomasReimann


I've had of course an Administrator Command Line (the title of the cmd shows Administrator:). If you disable UAC you get always the admin cmd window.

Running the 64bit exe from Start/Run gives the same message, but as a dialog window. I guess the 64bit version has a hardcheck for WindowsXP x64 (devcon.exe is from 2003).

Avatar of eerok512
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Downloaded and mounted the iso. There is no WinDDK folder. Searched also for devcon.exe, no results.
Found it after installing setuptools_x64fre.msi.