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

2025-05-07 17:08:14

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

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢