Enable/disable a device from the command line


Enable/disable a device from the command line



This article lets users enable/disable a tag from command line in a few easy steps.
The document shows how to carry out this activity on Windows XP by installing Devcon. The link to download this is provided in the article. This software displays all devices and thus the user can enable or disable a device according to his requirement. The commands for the same are included in the article.

This allows for example to enable / disable your internet connection (or network card) on the command line.

Install Devcon

  • 1. Download it on Microsoft Website : Link
  • 2. Unpack the file, once downloaded
  • 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 


To 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 be 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 eliminated the floppy drive system!
  • To prevent your computer from beeping:
    • ROOT\LEGACY_BEEP\0000 : Beep

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值