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.