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
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.
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.
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.
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