在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
当然,你也可以完全使用BAT操作注册表来完成修改注册表的键值的目的,具体方式留以后完善,如果你有好的想法,记得告诉我哦! USB_Disable.bat文件代码: 复制代码 代码如下: @echo off echo On Error Resume next>USB_Disable.vbs echo Dim WshShell>>USB_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 USB_Enable.bat文件代码: 复制代码 代码如下: @echo off echo On Error Resume next>USB_Enable.vbs echo Dim WshShell>>USB_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 把以上两段代码保存为bat文件,可以双击运行。 |
请发表评论