圆月山庄资源网 Design By www.vgjia.com

当然,你也可以完全使用BAT操作注册表来完成修改注册表的键值的目的,具体方式留以后完善,如果你有好的想法,记得告诉我哦!

USB_Disable.bat文件代码:

复制代码 代码如下:
@echo off
echo On Error Resume next>USB_Disable.vbs
echo Dim WshShellUSB_Disable.vbs
echo Set WshShell = WScript.CreateObject("WScript.Shell")USB_Disable.vbs
echo wshShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR\start", 4, "REG_DWORD"USB_Disable.vbs

cSCript USB_Disable.vbs
del USB_Disable.vbs
pause

USB_Enable.bat文件代码:

复制代码 代码如下:
@echo off
echo On Error Resume next>USB_Enable.vbs
echo Dim WshShellUSB_Enable.vbs
echo Set WshShell = WScript.CreateObject("WScript.Shell")USB_Enable.vbs
echo wshShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR\start", 3, "REG_DWORD"USB_Enable.vbs

cSCript USB_Enable.vbs
del USB_Enable.vbs
pause

把以上两段代码保存为bat文件,可以双击运行。

标签:
注册表禁用,启用,USB端口

圆月山庄资源网 Design By www.vgjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
圆月山庄资源网 Design By www.vgjia.com