@ Echo ************************************** **********
@ Echo. Author: free all
@ Echo. http://www.51cto.com
@ Echo ************************************** **********
@ Echo off
Cacls % SystemRoot % \ INF \ usbstor. inf/E/C/D system
Cacls % SystemRoot % \ INF \ usbstor. inf/E/C/D "Power Users"
Cacls % SystemRoot % \ INF \ usbstor. inf/E/C/D users
Cacls % SystemRoot % \ INF \ usbstor. inf/R "everyone"/E
Cacls % SystemRoot % \ INF \ usbstor. PNF/E/C/D system
Cacls % SystemRoot % \ INF \ usbstor. PNF/E/C/D "Power Users"
Cacls % SystemRoot % \ INF \ usbstor. PNF/E/C/D users
Cacls % SystemRoot % \ INF \ usbstor. PNF/R "everyone"/E
CLS
@ Echo Windows Registry Editor Version 5.00> % Temp % \ usb_temp.reg
@ Echo [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ usbstor]> % Temp % \ usb_temp.reg
@ Echo "type" = DWORD: 00000001> % Temp % \ usb_temp.reg
@ Echo "start" = DWORD: 00000004> % Temp % \ usb_temp.reg
@ Echo "errorcontrol" = DWORD: 00000001> % Temp % \ usb_temp.reg
@ Echo "ImagePath" = hex (2):, 00, 5C, 44, 00, \ >> % Temp % \ usb_temp.reg
@ Echo, 00, 4f, \> % Temp % \ usb_temp.reg
@ Echo, 00, 2e, 00, 00> % Temp % \ usb_temp.reg
@ Echo "displayname" = "USB Mass Storage driver"> % Temp % \ usb_temp.reg
@ Echo [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ usbstor \ Security]> % Temp % \ usb_temp.reg
@ Echo "security" = HEX: 01,00, 14,80, 90,00, 00,00, 9C, 00,00, 00,14, 00,00, 00,30, 00,00, 00,02, \>
@ Echo 00, 1C, 00, 00, 02, 00, FF, 01, 0f, 00, 00, 00, \ >> % Temp % \ usb_temp.reg
@ Echo, 60, 00, 00, 00, 00, 00, FD, 02, 00, 00, 00, 00, \> % Temp % \ usb_temp.reg
@ Echo, 00, 00, 18, 00, FF, 01, 0f, 00, 00, \> % Temp % \ usb_temp.reg
@ Echo, 8D, 01, 00, 05, 0b, 00, \> % Temp % \ usb_temp.reg
@ Echo, 00, FD, 01, 00, 00, 00, 01, 01, \> % Temp % \ usb_temp.reg
@ Echo,> % Temp % \ usb_temp.reg
@ Echo [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ usbstor \ Enum]> % Temp % \ usb_temp.reg5
@ Echo "count" = DWORD: 00000000> % Temp % \ usb_temp.reg
@ Echo "nextinstance" = DWORD: 00000000> % Temp % \ usb_temp.reg
CLS
Regedit/S % Temp % \ usb_temp.reg
Del % Temp % \ usb_temp.reg
@ Echo off
CLS
@ Echo by free all
@ Echo http: // www.51cto.com Note: USB mouse keyborad is not restricted .....
This article is from 51cto. com technical blog