南瓜园

 找回密码
 注册
查看: 1454|回复: 0

禁用电脑USB和启用USB命令

[复制链接]
发表于 2011-10-30 12:06:24 | 显示全部楼层 |阅读模式
使用的BAT文件命令是

@echo off
reg add "HKEY_LOCAL_ MACHINESYSTEMCurrentControlSet ControlStorageDevicePolicies“ /v WriteProtect /t reg_dword /d 1 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR" /v Start /t reg_dword /d 4 /f
copy %Windir%\inf\usbstor.inf %Windir%\usbstor.inf /y >nul
copy %Windir%\inf\usbstor.pnf %Windir%\usbstor.pnf /y >nul
del %Windir%\inf\usbstor.pnf /q/f >nul
del %Windir%\inf\usbstor.inf /q/f >nul
@echo on

解除命令
@echo off
reg delete "HKEY_LOCAL_ MACHINESYSTEMCurrentControlSet ControlStorageDevicePolicies“ /v WriteProtect  /f
reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR" /v Start  /f
copy %Windir%\usbstor.inf %Windir%\inf\usbstor.inf  /y >nul
copy %Windir%\usbstor.pnf  %Windir%\inf\usbstor.pnf /y >nul
@echo on
您需要登录后才可以回帖 登录 | 注册

本版积分规则

请大家牢记南瓜园网址 www.nan2008.com

QQ|小黑屋|手机版|Archiver|南瓜园

GMT+8, 2024-12-23 00:27 , Processed in 0.743958 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表