用批处理文件实现电脑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

  • UOS如何查询关机事件记录
  • IE11经常卡死无响应怎么办
  • 使用蒲公英智能组网,三步访问企业内网ERP系统
  • 如何通过注册表在任务栏上显示所有通知区域图标
  • windows Server 2016如何安装域控制器
  • 热门搜索
    脸上痤疮怎么治疗 商标r怎么打 妥当怎么读 日产阳光怎么样 圣安地列斯秘籍大全 三国演义成语大全 美女黄频视频大全免费的正片 怎么破解无线网密码 安全图片大全 周树人简介