Batch Script - Device Console
Last Updated :
20 Mar, 2025
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
Features of DevCon
- Descriptive driver packages.
- Show device status.
- INF files.
- Compatibility along with device setups.
- Perform Enable and Disable functions of a device.
- Search for devices and IDs(hardware IDs, device instance IDs, etc).
Syntax of DevCon command:
devcon [/m:\\computer] [/r] command [arguments]
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
Conclusion
Batch scripting and DevCon (Device Console) are useful utilities to automate device management and system administration on Windows. With DevCon commands, administrators can easily install, enable, disable, and debug drivers without the graphical user interface. It is useful particularly for IT staff, network administrators, and programmers dealing with multiple devices.
Since DevCon.exe is a command-line application, it has higher flexibility to do scripting and automating and so it's one of the unavoidable tools for IT engineers and system administrators. For those working in Windows device administration, knowing how to script by using batch in DevCon may save time and make it more convenient to run operations.
Similar Reads
Non-linear Components
In electrical circuits, Non-linear Components are electronic devices that need an external power source to operate actively. Non-Linear Components are those that are changed with respect to the voltage and current. Elements that do not follow ohm's law are called Non-linear Components. Non-linear Co
11 min read
Class Diagram | Unified Modeling Language (UML)
A UML class diagram is a visual tool that represents the structure of a system by showing its classes, attributes, methods, and the relationships between them. It helps everyone involved in a projectâlike developers and designersâunderstand how the system is organized and how its components interact
12 min read
Spring Boot Tutorial
Spring Boot is a Java framework that makes it easier to create and run Java applications. It simplifies the configuration and setup process, allowing developers to focus more on writing code for their applications. This Spring Boot Tutorial is a comprehensive guide that covers both basic and advance
10 min read
Backpropagation in Neural Network
Back Propagation is also known as "Backward Propagation of Errors" is a method used to train neural network . Its goal is to reduce the difference between the modelâs predicted output and the actual output by adjusting the weights and biases in the network.It works iteratively to adjust weights and
9 min read
Polymorphism in Java
Polymorphism in Java is one of the core concepts in object-oriented programming (OOP) that allows objects to behave differently based on their specific class type. The word polymorphism means having many forms, and it comes from the Greek words poly (many) and morph (forms), this means one entity ca
7 min read
AVL Tree Data Structure
An AVL tree defined as a self-balancing Binary Search Tree (BST) where the difference between heights of left and right subtrees for any node cannot be more than one. The absolute difference between the heights of the left subtree and the right subtree for any node is known as the balance factor of
4 min read
What is Vacuum Circuit Breaker?
A vacuum circuit breaker is a type of breaker that utilizes a vacuum as the medium to extinguish electrical arcs. Within this circuit breaker, there is a vacuum interrupter that houses the stationary and mobile contacts in a permanently sealed enclosure. When the contacts are separated in a high vac
13 min read
3-Phase Inverter
An inverter is a fundamental electrical device designed primarily for the conversion of direct current into alternating current . This versatile device , also known as a variable frequency drive , plays a vital role in a wide range of applications , including variable frequency drives and high power
13 min read
Linux Commands Cheat Sheet
Linux, often associated with being a complex operating system primarily used by developers, may not necessarily fit that description entirely. While it can initially appear challenging for beginners, once you immerse yourself in the Linux world, you may find it difficult to return to your previous W
13 min read
What is a Neural Network?
Neural networks are machine learning models that mimic the complex functions of the human brain. These models consist of interconnected nodes or neurons that process data, learn patterns, and enable tasks such as pattern recognition and decision-making.In this article, we will explore the fundamenta
14 min read