手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

用批处理文件实现电脑USB接口禁用开启

时间:2024-10-12 21:01:05

1、禁用电脑USB接口方法:新建一个文本文档,将下方内容复制到文本文档当中,然后保存文本文档,修改文本文档后缀为bat,r然后以管理员身份运行即可。@echo offreg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ControlStorageDevicePolicies" /v WriteProtect /t reg_dword /d 1 /freg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR" /v Start /t reg_dword /d 4 /fcopy %windir%\inf\usbstor.inf %windir%\usbstor.inf /y >nulcopy %windir%\inf\usbstor.pnf %windir%\usbstor.pnf /y >nuldel %windir%\inf\usbstor.pnf /q/f >nuldel %windir%\inf\usbstor.inf /q/f >nul@echo on

2、开启电脑USB接口方法:新建一个文本文档,将下方内容复制到文本文档当中,然后保存文本文档,修改文本文档后缀为bat,r然后以管理员身份运行即可。@echo offreg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ControlStorageDevicePolicies" /v WriteProtect /t reg_dword /d 1 /freg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR" /v Start /t reg_dword /d 3 /fcopy %windir%\inf\usbstor.inf %windir%\usbstor.inf /y >nulcopy %windir%\inf\usbstor.pnf %windir%\usbstor.pnf /y >nuldel %windir%\inf\usbstor.pnf /q/f >nuldel %windir%\inf\usbstor.inf /q/f >nul@echo on

© 手抄报圈