Only disable batch processing for USB storage devices

Source: Internet
Author: User
@ 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.