How to set a security line for u disk

Source: Internet
Author: User

Following the manual to create a password to access the U disk, the principle is to use TweakUI to change the U disk's automatic playback command.

Step 1: First copy a small volume of JPG and WAV format files to the U disk, and then set the U disk permissions to allow only the current account (LCR) Full Control. Now open Notepad to enter the following and save it as a lock.bat batch, placed in the C: Table of contents.

REM Note: To access the USB disk, please run the desktop "Open u Disk" and enter the correct password @cacls j:/e/r LCR

@pause

Command explanation: Run the cacls command to modify the J: (U disk) permission to deny LCR access.

Now, set up a batch Unlock.bat and send it to the desktop, whose shortcut name is "Open u Disk", which reads as follows:

@echo off

@runas/USER:LCR "cacls J:/g Lcr:f"

Command explanation: Re-run the cacls command with LCR to give LCR Full control of the U disk.

Step 2: Run TweakUI, expand My Computer → AutoPlay, and then check the "Activate removable media autoplay" option under Type. Click Create in the action item, and then follow the prompts to create a new AutoPlay interface called "Access U Disk", click "Change Program", select "C:lock.bat", and check "mixed content" in the supported media list. Because the system is automatically detected by the file type to pop up the playback window, so before we put in the U disk image and music files, so the system will detect its mixed content, and automatically execute the Lock.bat file, cancellation of LCR access rights.

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.