USB Control Computer Boot

Source: Internet
Author: User
Tags safe mode

Let the computer after inserting its own USB flash drive to start, or automatically shut down after startup, the following is the implementation process of the method:

1. First determine the drive letter, you can put your own USB stick, and then you can see the drive letter, this step is very important, if the letter is wrong, then let your computer to sleep it;

2. Create a file in the USB drive, file name and extension are arbitrary input, such as the author created a file of 123.LJ;

3. Create a batch file on your local disk (save As. bat with Notepad) with the following line of statements:

Ifnotexisti:123.ljshutdown-s-t10-c "You cannot use this computer"

Here I is the USB drive letter, which means that if there is no 123.lj file in the USB stick, the computer will be shut down after 10 seconds and the message "You cannot use this computer" is displayed.

4. In the run, enter "Gpedit.msc" to open the Group Policy, and navigate to the following path: "Local computer" policy → computer machine configuration →windows settings → script (startup/shutdown), and then select "Startup" in the box to the right and add the batch file you just created to the startup script list , OK and quit on it.

When you're done, you can only plug in the USB flash drive to start your computer and enter the system, or you'll see the following prompt and turn off your computer within a specified time:

Also, say the solution in case of lost USB.

1. If the time is enough, you can enter "Shutdown-a" in the operation to remove the shutdown instruction;

2. You can also boot the computer into Safe mode to remove the startup script because the boot script is not loaded in Safe mode

Note : More please pay attention to the Computer tutorial section, triple Computer office group: 189034526 welcome you to join

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.