Feb 032008

The DevCon utility is a command-line utility that acts as an alternative to Device Manager. Using DevCon, you can enable, disable, restart, update, remove, and query individual devices or groups of devices. DevCon also provides information that is relevant to the driver developer and is not available in Device Manager.

You can use DevCon with Microsoft Windows 2000, Windows XP, and Windows Server 2003. You cannot use DevCon with Windows 95, Windows 98, or Windows Millennium Edition.

Download Devcon From Here

Using DevCon

Devcon Syntax

devcon.exe [-r] [-m:\\<machine>] <command> [<arg>...]

Examples for DevCon

devcon -m:\\test find pci\*

Lists all known PCI devices on the computer test. (By using-m, you can specify a target computer. You must use Interprocess communication (IPC) to access the computer.)

devcon -r install %WINDIR%\Inf\Netloop.inf *MSLOOP

Installs a new instance of the Microsoft loopback adaptor. This creates a new root-enumerated device node with which you can install a “virtual device,” such as the loopback adaptor. This command also restarts the computer silently if a restart is required.

devcon classes

Lists all known setup classes. The output contains the short nonlocalized name (for example, “USB”) and the descriptive name (for example, “Universal Serial Bus controllers”).

devcon classfilter upper !filter1 !filter2

Deletes the two specified filters.

devcon classfilter lower !badfilter +goodfilter

Replaces the “badfilter” with the “goodfilter”.

devcon driverfiles =ports

Lists files that are associated with each device in the ports setup class.

devcon disable *MSLOOP

Disables all devices that have a hardware ID that ends in “MSLOOP” (including “*MSLOOP”).

devcon drivernodes @ROOT\PCI_HAL\PNP0A03

Lists all compatible drivers for the device ROOT\PCI_HAL\PNP0A03. This can be used to determine why an integral device information (.inf) file was chosen, instead of a third-party .inf file.

devcon enable ‘*MSLOOP

Enables all devices that have a hardware ID of “*MSLOOP”. The single quotation mark indicates that the hardware ID must be taken literally (in other words, the asterisk ["*"] actually is an asterisk; it is not a wildcard character).

devcon find *

Lists device instances of all devices that are present on the local computer.

devcon find pci\*

Lists all known peripheral component interconnect (PCI) devices that are on the local computer (this command assumes that a device is PCI if it has a hardware ID that is prefixed by “PCI\”).

devcon find =ports *pnp*

Lists devices that are present that are a member of the ports setup class and that contain “PNP” in their hardware ID.

devcon find =ports @root\*

Lists devices that are present that are a member of the ports setup class and that are in the “root” branch of the enum tree (the instance ID is prefixed by “root\”). Note that you should not make any programmatic assumption about how an instance ID is formatted. To determine root devices, you can look at device status bits. This feature is included in DevCon to aid in debugging.

devcon findall =ports

Lists “nonpresent” devices and devices that are present for the ports class. This includes devices that have been removed, devices that have been moved from one slot to another, and, in some cases, devices that have been enumerated differently due to a BIOS change.

devcon listclass usb 1394

Lists all devices that are present for each class named (in this case, USB and 1394).

devcon remove @usb\*

Removes all USB devices. Devices that are removed are listed with their removal status.

devcon rescan

Rescans for new Plug and Play devices.

devcon resources =ports

Lists the resources that are used by all devices in the ports setup class.

devcon restart =net @’ROOT\*MSLOOP\0000

Restarts the loopback adaptor ROOT\*MSLOOP\0000. The single quotation mark in the command indicates that the instance ID must be taken literally.

devcon hwids=mouse

Lists all hardware IDs of mouse class devices on the system.

devcon sethwid @ROOT\LEGACY_BEEP\0000 := beep

Assign the hardware ID, beep, to the legacy beep device.

devcon stack =ports

Lists the expected driver stack for the device. This includes device and class upper/lower filters, and the controlling service.

devcon status @pci\*

Lists the status of each device present that has an instance ID that begins with “pci\”.

devcon status @ACPI\PNP0501\1

Lists the status of a specific device instance, in this case an Advanced Configuration and Power Interface (ACPI)-enumerated serial port.

devcon status @root\rdp_mou\0000

Lists the status of the Microsoft Terminal Server or Terminal Services mouse driver.

devcon status *PNP05*

Lists the status of all COM ports.

devcon update mydev.inf *pnp0501

Updates all devices that exactly match the hardware ID *pnp0501 to use the best driver in Mydev.inf that is associated with the hardware ID *pnp0501.

If you wan more help about devcon use the following command

devcon help

Incoming search terms:

  11 Responses to “DevCon – an alternative to Device Manager command-line utility”

  1. I am running windows 7 RC1 build 7100.

    when i try to run devcon in the command line (cmd) it immediately closes before I can read any output.

    any idea how to keep it from doing that?

    thank you!

    PS: you can email me with a solution @ devcon.3.2holdon@dfgh.net

  2. I have a similar problem. I run ‘devcon help’ and it opens a NEW window, runs down the help and closes before I can read it. Totally useless. HELP! Please note it’s not the window I use to execute the command that closes but a new window. Is there any way I can get the info to be displayed in the same window?

  3. The problem describe by Bee is a good additional description to my problem.

    With Windows 7 (win7) it seems devcon runs in an extra instance, regardless if started manually from commandline or not.

    any help still is appreciated. thanks!

    @bee: Thanks for your mail, but as you see I couldn’t find out anything helpful. let’s hope.. ;-)

  4. actually, now that I tried it again, it works.

    however I have no idea how and why it does now and would’t before…

  5. i got this problem as well :-( any solution

  6. Solution is simple. You have to run cmd.exe as administrator[start]->[accessories] right click [cmd.exe] select [Run as administrator]. Then you have to switch to the directory that contains devcon.exe. Now the output should stays in the opened console.

  7. An another solution of the problem is UAC disabling.
    Control Panel -> User Accounts -> User Account Control.
    I have an russian interface, so i have to translate menu item names into english. It may have some differences.

  8. Is anyone able to disable a driver in Windows 7 using devcon?

  9. rem disable WiFi card driver
    devcon disable “PCI\VEN_14E4&DEV_4315&SUBSYS_000C1028&REV_01″

    rem disable LAN card driver
    devcon disable “PCI\VEN_8086&DEV_10F5&SUBSYS_02331028&REV_03″

    you need special version of devcon from “Windows Driver Kit (WDK) 7.1.0″

  10. hello
    i try to remove or disable a driven (a hub, or a sound card) with devcon. As you suggest it, i take it from WDK, but i have the same problem: the remove or disable failed:
    c:/>devcon remove *VID_0763*
    USB\VID_0763&PID_2080\6&2247FF53&0&3 : Remove failed
    No devices were removed.

    c:/>devcon remove *VID_050D*
    USB\VID_050D&PID_0224\5&30124DE0&0&5 : Remove failed
    No devices were removed.

    if i write devcon status USB*, all the drives are listed running
    Name: M-Audio Fast Track Ultra
    Driver is running.
    Name: Generic USB Hub
    Driver is running.

    what to do?

  11. the answer is here:
    but the desactivaion, by ‘devcon disable’, is a few seconds long, my device is reactivated by windows
    any suggestion?

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>