Windows driver developers and testers can use DevCon to verify that a driver is installed and configured correctly, including the proper INF files, driver stack, driver files, and driver package. You can also use the DevCon commands (enable, disable, install, start, stop, and continue) in scripts to test the driver.
DevCon is a command-line tool that performs device management functions on local computers.
Devcon features include:
Display driver and device info DevCon can display the following properties of drivers and devices on local computers:
Search for devices DevCon can search for devices on a local computer by hardware ID, device instance ID, or device setup class.
Change device settings DevCon can change the status or configuration of Plug and Play (PnP) devices on the local computer in the following ways:
Restart the device or computer DevCon can restart a local device, reboot the local system on demand, or reboot the local system if required for another DevCon operation.
devcon [-r] [-m:\\] [ ...] -r Reboots the system only when a restart or reboot is required. -u Unicode (UTF-16) output Specifies a remote computer. Specifies a Devcon command (see command list below). ... One or more arguments that modify a command. For help with a specific command, type: devcon help classfilter Add, delete, and reorder class filters. classes List all device setup classes. disable Disable devices. driverfiles List installed driver files for devices. drivernodes List driver nodes of devices. enable Enable devices. find Find devices. findall Find devices, including those that are not currently attached. help Display Devcon help. hwids List hardware IDs of devices. install Install a device manually. listclass List all devices in a setup class. reboot Reboot the local computer. remove Remove devices. removeall Remove devices, including those that are not currently attached. rescan Scan for new hardware. resources List hardware resources for devices. restart Restart devices. sethwid Modify Hardware ID's of listed root-enumerated devices. stack List expected driver stack for devices. status List running status of devices. update Update a device manually. updateni Manually update a device (non interactive). dp_add Adds (installs) a third-party (OEM) driver package. dp_delete Deletes a third-party (OEM) driver package. dp_enum Lists the third-party (OEM) driver packages installed on this machine.
https://github.com/microsoft/Windows-driver-samples/tree/main/setup/devcon