电脑开启/关闭屏蔽USB脚本

关闭USB 脚本

@echo off

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies" /v WriteProtect /t reg_dword /d 1 /f

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR" /v Start /t reg_dword /d 4 /f

copy %Windir%\inf\usbstor.inf %Windir%\usbstor.inf /y >nul

copy %Windir%\inf\usbstor.pnf %Windir%\usbstor.pnf /y >nul

del %Windir%\inf\usbstor.pnf /q/f >nul

del %Windir%\inf\usbstor.inf /q/f >nul

开启USB脚本

@echo off

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR" /v Start /t reg_dword /d 3 /f

copy %Windir%\usbstor.inf %Windir%\inf\usbstor.inf /y >nul

copy %Windir%\usbstor.pnf %Windir%\inf\usbstor.pnf /y >nul

del %Windir%\usbstor.pnf /q/f >nul

del %Windir%\usbstor.inf /q/f >nul
THE END
分享
二维码
打赏
海报
电脑开启/关闭屏蔽USB脚本
关闭USB 脚本 @echo off reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies" /v WriteProtect /t reg_dword /d 1 /f……
<<上一篇
下一篇>>