注册表限制使用U盘的几种方法

1.写保护操作:

1、运行REGEDIT,
2、展开HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet,
3、右击Control项,选择新建,重命名新建项为WriteProtect,并设置其值为00000001(十六进制),然后刷新即可.
4、若要取消对闪存写保护的限制,将值改为00000000即可.

 

2. 禁用U盘:


1、运行REGEDIT,
2、展开HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR,
3、右击Start,将其值改为4,则可将U盘禁用,若要取消禁用,只需将4改回3.

 

3.注册表法
禁止使用USB存储设备的注册表内容如下:
    在记事本把代码保存成一个名为lockusb.reg的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

开启USB存储设备使用权限的注册表内容如下:
    代码保存成一个以unlockusb.reg后缀的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

 

4.U盘的表现:在硬盘里可以找到,能看到容量,也可以打开,可就是不能往里面写东西,格式化时,又提示说什么请先去掉写保护。。。真是狂晕啊,。。。

修复过程:
三、修改注册表
1、打开注册表win+r(即开始-运行)键入regedit.exe
2、进入如下目录HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\StorageDevicePolicies;
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\StorageDevicePolicies
若没有StorageDevicePolicies项则建立此项
(附:这是2000的系统,XP的我没进去仔细看过,如果懒得动的话,复制下面这些另存文本,再改为*.reg双击导入注册表即可)
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\StorageDevicePolicies]
"WriteProtect"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies]
"WriteProtect"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\StorageDevicePolicies]
"WriteProtect"=dword:00000000
3、建立Dword值命名为WriteProtect并令其值为0
4、重启时带U盘重启,当系统重启至U盘灯闪时,拔掉U盘
5、系统重启完毕后插入U盘,U盘操作恢复正常

以上内容仅供大家参考!

你可能感兴趣的:(注册表)