Various commands of DevCon to perform different functions
Function 1: DevCon status operation
It is used to find the status of all the devices on a local computer.
devcon status * > status.txt
Function 2: DevCon DriverFiles operation
It helps in the listing of file names of drivers in the system devices.
devcon driverfiles * > driverfiles.txt
Function 3: DevCon Install operation
Given below command is used to install the devices on a local computer.
devcon /r install c:\windows\inf\keyboard.inf *PNP030b
Function 4: Enables all printer devices
It is used to specify the Printer setup class.
devcon /r enable = Printer
Function 5: Re-scan
It is used to re-scan the computer for new devices.
devcon rescan
Batch Script – Device Console
A batch script is a text file that includes various sequential commands. It is used to evaluate repetition routines in Windows, OS/2, and DOS operating systems and is used in network and system administration. A batch file refers to a file that stores command in a serial order. The library has been modified by Windows which can be used in Batch Script for coordination with the system devices. This is called a device console (DevCon.exe). The developer can easily use the DevCon to check the installation and configuration of a driver, which includes the INF files(driver package). Users can also perform installation, start, stop, etc. in scripts to test the driver files. It is a command-line tool that executes device management on the computer system.
DevCon kit can be located on the given below location after getting installed.
%WindowsSdkDir%\tools\x64\devcon.exe
%WindowsSdkDir%\tools\x86\devcon.exe
%WindowsSdkDir%\tools\arm\devcon.exe