China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-29 11:26
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Share] Disabling & Enabling USB Devices Is So Simple (Classifiable by Standards) View 6,845 Replies 35
Floor 16 Posted 2008-01-26 21:53 ·  中国 浙江 温州 电信
初级用户
★★
Credits 158
Posts 89
Joined 2007-04-25 08:06
19-year member
UID 86402
Gender Male
Status Offline
Study, keep it up.....
Floor 17 Posted 2008-02-29 17:13 ·  中国 北京 联通
中级用户
★★
Credits 206
Posts 100
Joined 2007-07-09 20:51
18-year member
UID 93566
Gender Male
Status Offline
Floor 18 Posted 2008-03-02 11:27 ·  中国 河北 秦皇岛 电信
初级用户
Credits 20
Posts 7
Joined 2008-01-27 13:43
18-year member
UID 109647
Gender Male
Status Offline
Thanks, really a great expert, admire
Floor 19 Posted 2008-03-02 11:27 ·  中国 河北 秦皇岛 电信
初级用户
Credits 20
Posts 7
Joined 2008-01-27 13:43
18-year member
UID 109647
Gender Male
Status Offline
Floor 20 Posted 2008-03-02 11:28 ·  中国 河北 秦皇岛 电信
初级用户
Credits 20
Posts 7
Joined 2008-01-27 13:43
18-year member
UID 109647
Gender Male
Status Offline
How did you learn it? Why can't I learn it?
Floor 21 Posted 2008-03-02 12:59 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
Originally posted by mez2007 at 2008-3-2 11:28:
How did you learn it? Why can't I learn it?

It depends on how much you know about the underlying things of Windows. Also, look at more OEM.inf and hardware-related registry entries
第一高手 第二高手

Floor 22 Posted 2008-03-02 17:57 ·  中国 黑龙江 鸡西 虎林市 联通
初级用户
Credits 25
Posts 14
Joined 2006-11-02 01:05
19-year member
UID 69226
Gender Male
Status Offline
A great post, I can't help but upvote after reading it
Floor 23 Posted 2008-03-02 18:17 ·  中国 黑龙江 鸡西 虎林市 联通
初级用户
Credits 25
Posts 14
Joined 2006-11-02 01:05
19-year member
UID 69226
Gender Male
Status Offline
I tried using devcon to disable the camera, and it was disabled, but I can see in Device Manager that the camera device has a cross. After enabling the camera and restarting the computer, the camera can be used again. Is there a way to make others not see the camera in Device Manager?
Floor 24 Posted 2008-03-02 19:25 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
Originally posted by windowsxphao at 2008-3-2 18:17:
I tried using devcon to disable the camera, and it was disabled, but in the device manager, the camera device is crossed out. After enabling the camera and restarting the computer, the camera can be used again. Is there a way to make others not see the camera in the device manager.

After enabling the camera and restarting the computer, the camera can be used again? Of course it can be used if it is enabled. If it is disabled and still can be used, delete the camera's boot startup item. The location is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

To not see the X, you can disable the device manager in the policy.
第一高手 第二高手

Floor 25 Posted 2008-03-12 14:45 ·  中国 广西 南宁 电信
初级用户
★★
Credits 127
Posts 59
Joined 2007-11-13 00:41
18-year member
UID 102491
Gender Female
Status Offline
Expert, the method you provided to disable the keyboard and mouse isn't working. I used devcon disable root\rdp_kbd* to try disabling the keyboard, but the returned result is: "Not all of one device(s) disabled, at least one requires reboot computer to complete the operation". Does this mean more than one device isn't disabled and at least one needs a computer reboot to complete?

This doesn't work either. devcon disable *pnp0303* returns the prompt:
Acpi\pnp0303\4&31ad995d&0 : disable failed
No devices disabled.

Also, if I reboot, the keyboard can't input, then how do I enter the command devcon enable root\kdp_kbd* to enable the keyboard device? Directly use the mouse to enable it in hardware? But what if the mouse is also disabled?
-------I'm a newbie. Hope the expert can answer, thanks!

[ Last edited by nanhui112 on 2008-3-12 at 03:06 PM ]
Floor 26 Posted 2008-03-12 23:21 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
devcon.exe disable USB\Class_03 This is to disable USB keyboards and mice. The mouse works, and you can enable it in Device Manager.
第一高手 第二高手

Floor 27 Posted 2008-03-13 18:17 ·  中国 广西 南宁 电信
初级用户
★★
Credits 127
Posts 59
Joined 2007-11-13 00:41
18-year member
UID 102491
Gender Female
Status Offline
Then my keyboard and mouse can't be disabled, right? Then directly using devcon disable usb* to disable all USB ports is better?
Floor 28 Posted 2008-12-11 09:56 ·  中国 广东 广州 电信
初级用户
Credits 23
Posts 11
Joined 2008-08-29 14:18
17-year member
UID 124475
Gender Male
Status Offline
Learned. Thanks for the selfless sharing
Floor 29 Posted 2008-12-11 10:55 ·  中国 广东 佛山 顺德区 联通
新手上路
Credits 15
Posts 6
Joined 2006-07-23 00:43
19-year member
UID 59046
Status Offline
Thanks for sharing
Floor 30 Posted 2008-12-11 13:34 ·  中国 吉林 长春 联通
初级用户
Credits 50
Posts 40
Joined 2008-01-14 05:56
18-year member
UID 108541
Gender Male
Status Offline
Disabled things, try plugging it into another USB port and reinserting it?
Forum Jump: