方法一,BIOS设置法
重新启动计算机,在开机过程中,点击键盘上的“Delete”键,进入BIOS设置界面,选择“Integrated Peripherals”选项,展开后将“USB 1.1 Controller”和“USB 2.0 Contr01ler”选项的属性设置为“Disableed”,即可禁用USB接口。最后别忘记给BIOS设置上一个密码,这样他人就无法通过修改注册表解“锁”上述设备了。
方法二,注册表法(适用于Windows XP/2003)
利用该方法可以锁定电脑上的USB接口,从而达到禁止他人使用闪盘或移动硬盘等可移动存储设备的目的。
在“运行”对话框中输入“regedit”,回车后,打开注册表编辑器,依次展开如下分支[HKEY_LOCAL_MACHINE\SYSTEM\CurrentCntrolSet\Services\USBSTOR],在右侧的窗格中找到名为“Start”的DWORD值,双击,在弹出的编辑对话框中将其数值数据修改为十六位进制数值“4”。点“确定”按钮并关闭注册表编辑器,重新启动计算机,使设置生效。重启后,当有人将USB存储设备连接到计算机时,虽然USB设备上的指示灯在正常闪烁,但在资源管理器当中就是无法找到其盘符,因此也就无法使用USB设备了。
提示:“Start”这个键是USB设备的工作开关,默认设置为“3”表示手动,“2”是表示自动,“4”是表示停用
在“运行”对话框中输入“regedit”,回车后,打开注册表编辑器,依次展开如下分支[HKEY_LOCAL_MACHINE\SYSTEM\CurrentCntrolSet\Services\USBSTOR],在右侧的窗格中找到名为“Start”的DWORD值,双击,在弹出的编辑对话框中将其数值数据修改为十六位进制数值“4”。点“确定”按钮并关闭注册表编辑器,重新启动计算机,使设置生效。重启后,当有人将USB存储设备连接到计算机时,虽然USB设备上的指示灯在正常闪烁,但在资源管理器当中就是无法找到其盘符,因此也就无法使用USB设备了。
提示:“Start”这个键是USB设备的工作开关,默认设置为“3”表示手动,“2”是表示自动,“4”是表示停用
三,注册表限制法:
如果电脑已经用过USB存储设备,那么禁止起来就更加方便了,直接使用注册表文件进行导入操作即可。
如果电脑已经用过USB存储设备,那么禁止起来就更加方便了,直接使用注册表文件进行导入操作即可。
禁止使用USB存储设备的注册表内容如下:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR]
"Type"=dword:00000001
"Start"=dword:00000004
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,44,00,\
52,00,49,00,56,00,45,00,52,00,53,00,5c,00,55,00,53,00,42,00,53,00,54,00,4f,\
00,52,00,2e,00,53,00,59,00,53,00,00,00
"DisplayName"="USB 大容量存储设备"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR\Security]
"Security"=hex:01,00,14,80,90,00,00,00,9c,00,00,00,14,00,00,00,30,00,00,00,02,\
00,1c,00,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,\
00,00,02,00,60,00,04,00,00,00,00,00,14,00,fd,01,02,00,01,01,00,00,00,00,00,\
05,12,00,00,00,00,00,18,00,ff,01,0f,00,01,02,00,00,00,00,00,05,20,00,00,00,\
20,02,00,00,00,00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,0b,00,00,00,00,\
00,18,00,fd,01,02,00,01,02,00,00,00,00,00,05,20,00,00,00,23,02,00,00,01,01,\
00,00,00,00,00,05,12,00,00,00,01,01,00,00,00,00,00,05,12,00,00,00
我们将上面的代码保存成一个以REG为后缀的文本文件,然后双击该文件导入注册表就完成了禁止该计算机使用USB存储设备的操作。所有用户都无法用USB存储设备了,这点和上面仅仅是根据用户或用户组来限制的方法是不同的,效果更好应用范围更广。
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR]
"Type"=dword:00000001
"Start"=dword:00000004
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,44,00,\
52,00,49,00,56,00,45,00,52,00,53,00,5c,00,55,00,53,00,42,00,53,00,54,00,4f,\
00,52,00,2e,00,53,00,59,00,53,00,00,00
"DisplayName"="USB 大容量存储设备"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR\Security]
"Security"=hex:01,00,14,80,90,00,00,00,9c,00,00,00,14,00,00,00,30,00,00,00,02,\
00,1c,00,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,\
00,00,02,00,60,00,04,00,00,00,00,00,14,00,fd,01,02,00,01,01,00,00,00,00,00,\
05,12,00,00,00,00,00,18,00,ff,01,0f,00,01,02,00,00,00,00,00,05,20,00,00,00,\
20,02,00,00,00,00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,0b,00,00,00,00,\
00,18,00,fd,01,02,00,01,02,00,00,00,00,00,05,20,00,00,00,23,02,00,00,01,01,\
00,00,00,00,00,05,12,00,00,00,01,01,00,00,00,00,00,05,12,00,00,00
我们将上面的代码保存成一个以REG为后缀的文本文件,然后双击该文件导入注册表就完成了禁止该计算机使用USB存储设备的操作。所有用户都无法用USB存储设备了,这点和上面仅仅是根据用户或用户组来限制的方法是不同的,效果更好应用范围更广。
开启USB存储设备使用权限的注册表内容如下:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR]
"Type"=dword:00000001
"Start"=dword:00000003
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,44,00,\
52,00,49,00,56,00,45,00,52,00,53,00,5c,00,55,00,53,00,42,00,53,00,54,00,4f,\
00,52,00,2e,00,53,00,59,00,53,00,00,00
"DisplayName"="USB 大容量存储设备"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR\Security]
"Security"=hex:01,00,14,80,90,00,00,00,9c,00,00,00,14,00,00,00,30,00,00,00,02,\
00,1c,00,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,\
00,00,02,00,60,00,04,00,00,00,00,00,14,00,fd,01,02,00,01,01,00,00,00,00,00,\
05,12,00,00,00,00,00,18,00,ff,01,0f,00,01,02,00,00,00,00,00,05,20,00,00,00,\
20,02,00,00,00,00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,0b,00,00,00,00,\
00,18,00,fd,01,02,00,01,02,00,00,00,00,00,05,20,00,00,00,23,02,00,00,01,01,\
00,00,00,00,00,05,12,00,00,00,01,01,00,00,00,00,00,05,12,00,00,00
我们将上面的代码保存成一个以REG为后缀的文本文件,然后双击该文件导入注册表就完成了开启该计算机使用USB存储设备的操作。所有用户都可以使用USB存储设备。
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR]
"Type"=dword:00000001
"Start"=dword:00000003
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,44,00,\
52,00,49,00,56,00,45,00,52,00,53,00,5c,00,55,00,53,00,42,00,53,00,54,00,4f,\
00,52,00,2e,00,53,00,59,00,53,00,00,00
"DisplayName"="USB 大容量存储设备"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR\Security]
"Security"=hex:01,00,14,80,90,00,00,00,9c,00,00,00,14,00,00,00,30,00,00,00,02,\
00,1c,00,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,\
00,00,02,00,60,00,04,00,00,00,00,00,14,00,fd,01,02,00,01,01,00,00,00,00,00,\
05,12,00,00,00,00,00,18,00,ff,01,0f,00,01,02,00,00,00,00,00,05,20,00,00,00,\
20,02,00,00,00,00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,0b,00,00,00,00,\
00,18,00,fd,01,02,00,01,02,00,00,00,00,00,05,20,00,00,00,23,02,00,00,01,01,\
00,00,00,00,00,05,12,00,00,00,01,01,00,00,00,00,00,05,12,00,00,00
我们将上面的代码保存成一个以REG为后缀的文本文件,然后双击该文件导入注册表就完成了开启该计算机使用USB存储设备的操作。所有用户都可以使用USB存储设备。
转载于:https://blog.51cto.com/490449/128525