4
Thanks

A few words of thanks would be greatly appreciated.

Enable/Disable a Device from the Command Line

This article helps users to enable/disable a tag from the command line in a few easy steps. We will show you how to carry out this activity on Windows OS by installing DevCon. This software displays all devices and thus the user can enable or disable a device according to their needs and usually comes installed when you install WDK, Visual Studio, and the Windows SDK.



Install DevCon

This allows you enable/disable your internet connection (or network card) on the command line.
  • 1. To download, go to the Microsoft website.
  • 2. Once downloaded, unpack the file
  • 3. Copy \i386\devcon.exe to c:\windows\system32
  • 4. Locate the device that you want. In the command prompt type:
    devcon find *

Display all the devices in the system

  • In the command prompt, type
    devcon find *> list.txt 
    • To get the list in a file
  • For example, my network card Accton appears as:
    • PCI\VEN_1113&DEV_1211&SUBSYS_12111113&REV_10\3&13C0B0C5&0&48: Accton EN1207D Series PCI Fast Ethernet Adapter #2 


Choose a piece of the string that identifies the device, and verify it is unique:

c:\>devcon find *VEN_1113     
PCI\VEN_1113&DEV_1211&SUBSYS_12111113&REV_10\3&13C0B0C5&0&48: Accton EN1207D Ser
ies PCI Fast Ethernet Adapter #2
1 matching device(s) found.


Make sure that "VEN_1113" means a single network card.

Enable/disable the device

devcon disable *VEN_1113      
devcon enable *VEN_1113


This allows me to enable/disable my network card (and therefore my internet connection) from the command line.

Other devices

  • The floppy disk drive is:
    • ACPI\PNP0700\3&13C0B0C5&0 : standard disk controller
  • To disable/enable it at will:
    • devcon disable * PNP0700 
    • This eliminates the floppy drive system!
  • To prevent your computer from beeping:
    • ROOT\LEGACY_BEEP\0000 : Beep

Image: © snig - Shutterstock.com
4
Thanks

A few words of thanks would be greatly appreciated.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
This document, titled « Enable/Disable a Device from the Command Line », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).

0 Comments