Devcon的用法
Devcon的用法 (
?
#列出所有PCI設備的ID
Devcon find pci\*
如:
PCI\VEN_10EC&DEV_8139&SUBSYS_813910EC&REV_10\4&172A2BDD&0&18F0: Realtek RTL8139
Family PCI Fast Ethernet NIC
其中 : 號前面的 PCI\VEN_10EC 就是設備 ID 號。后面的是設備名稱。ID 號也可以用 *DEV_8139* 來表示。
#開啟設備命令:
Devcon enable PCI\VEN_10EC
或者寫成
Devcon enable *DEV_8139*
?
#禁用設備命令:
Devcon disable PCI\VEN_10EC
或者寫在成
Devcon disable *DEV_8139*
?
禁用設備的命令是:
devcon disable 設備ID
這個設備ID怎么得到呢?可以通過設備管理器,在設備上點擊“屬性”,在“詳細信息”標簽里面有個下拉列表,選擇“設備范例Id”,下面顯示出來的就是設備ID,直接CTRL+C就OK了。
2、設備ID不能直接輸入,否則會把ID開頭相同的一大堆設備都操作一遍,最后還會出幾個錯誤提示;加上雙引號也不行,會提示沒有設備被禁用/啟用;必須這樣寫:@"設備ID",所以最后的命令格式是:
devcon disable @"設備ID"
如:
devcon disable @"PCI\VEN_10EC&DEV_8139&SUBSYS_813910EC&REV_10\4&172A2BDD&0&18F0"
?
各設備分類(class)標準 列表
00 Use class information in the Interface Descriptors
01 Audio
02 Communications and CDC Control
03 HID (Human Interface Device)
05 Physical
06 Image
07 Printer
08 Mass Storage
09 Hub
0A CDC-Data
0B Smart Card
0D Content Security
0E Video
0F Personal Healthcare
DC Diagnostic Device
E0 Wireless Controller
EF Miscellaneous
FE Application Specific
FF Vendor Specific
關閉類設備:
devcon.exe disable USB\Class_08
禁用U盤,即刪除U盤,不管你有N個U盤統統一起刪除
devcon.exe disable USB\Class_06
禁用數碼相機,包括數碼相機附帶的可移動磁盤
devcon.exe disable USB\Class_03
禁用USB鼠標&鍵盤
devcon.exe disable USB\Class_ff
總結
- 上一篇: 支付宝当面付接口如何计算优惠
- 下一篇: C++开发坦克大战--补充(加入传送门)