Windows now has a better library which can be used in Batch Script for working with devices attached to the system. This is recognized as the device console – DevCon.exe.
Windows driver architects and analyzers can utilize DevCon to check that a driver is introduced and designed effectively, including the correct INF records, driver stack, driver documents, and driver bundle. You can likewise utilize the DevCon orders (empower, handicap, introduce, begin, stop, and proceed) in contents to test the driver. DevCon is a summon line instrument that performs gadget administration works on neighborhood PCs and remote PCs.
Show driver and gadget information DevCon can show the accompanying properties of drivers and gadgets on nearby PCs, and remote PCs (running Windows XP and prior) −
Enable a device.
Disable a device.
Update drivers (interactive and non-interactive).
Install a device (create a devnode and install software).
Remove a device from the device tree and delete its device stack.
Rescan for Plug and Play devices.
Add, delete, and reorder the hardware IDs of root-enumerated devices.
Change the upper and lower filter drivers for a device setup class.
Add and delete third-party driver packages from the driver store.
DevCon (DevCon.exe) is included when you install the WDK, Visual Studio, and the Windows SDK for desktop apps. DevCon.exe kit is available in the following locations when installed.
To list and display information about devices on the computer, use the following commands −
To search for information about devices on the computer, use the following commands −
To manipulate the device or change its configuration, use the following commands −
Ensuing are some instances on how the DevCon command is used.
The resulting command uses the DevCon DriverFiles operation to list the file names of drivers that devices on the system use. The command uses the wildcard character (*) to indicate all devices on the system. Because the output is extensive, the command uses the redirection character (>) to redirect the output to a reference file, driverfiles.txt.
The resulting command customs the DevCon status operation to find the status of all devices on the local computer. It then saves the status in the status.txt file for logging or later review. The command uses the wildcard character (*) to represent all devices and the redirection character (>) to redirect the output to the status.txt file.
The resulting command allows all printer plans on the computer by specifying the Printer setup class in a DevCon Enable command. The command includes the /r parameter, which reboots the system if it is necessary to make the enabling effective.
The resulting command uses the DevCon Install operation to install a keyboard device on the local computer. The command includes the full path to the INF file for the device (keyboard.inf) and a hardware ID (*PNP030b).
The following command will scan the computer for new devices.
The following command will rescan the computer for new devices.
Batch Script Tutorial
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.