USB flash drive as the boot key

Source: Internet
Author: User

Www.2cto.com: if your computer must be authorized to open, or you can only open it yourself, please refer to this article.

1. first, determine the drive letter of the USB flash drive. You can insert your own USB flash drive, and then you can see the drive letter. This step is very important. If the drive letter is wrong, let your computer sleep;
2. Create a file in the USB flash drive. The file name and extension are all input. For example, the file created by the author is 123.lj;
3. Create a batch file on the local disk (save it as. bat in Notepad) with the following statement:
IfnotexistI: \ 123. ljshutdown-s-t10-c "you cannot use this computer"
Here I is the USB drive letter, which means that if the USB flash drive does not exist 123. the lj file closes the computer 10 seconds later and displays the prompt "you cannot use this computer.
4. enter "gpedit. msc "Open the Group Policy and go to the following path:" Local Computer "policy → computer machine configuration → Windows Settings → script (start/stop ), select "start" in the box on the right, add the batch file you just created to the startup script list, and click OK and exit.
At this point, the computer can be started and enter the system only when a USB flash is inserted. Otherwise, the following prompt will appear and the computer will be shut down within the specified time:
In addition, let's talk about the solution when the USB flash drive is lost.
1. If you have enough time, you can enter "shutdown-a" in the operation to cancel the shutdown command;
2. You can also delete the boot script from the computer to safe mode, because the boot script will not be loaded in safe mode.

Related Article

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.