Insert a U disk to boot the implementation process

Source: Internet
Author: User
Tags safe mode

How to let the computer after inserting its own USB drive to start, or automatically shutdown after startup, the following is the implementation of the method:

1. First determine the USB disk letter, you can plug in your USB drive, and then you can see the letter, this step is very important, if the letter is wrong, then let your computer sleep;

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

3. Create a batch file on the local disk (saved with Notepad as. bat), which is the following line statement:

Ifnotexisti:123.ljshutdown-s-t10-c "You can't use this computer"

Here I is the USB drive, which means that if the 123.lj file does not exist in the USB disk, the computer is turned off after 10 seconds and the message "You cannot use the computer" is displayed.

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

Here is the end, at this time, only when the boot on the USB drive to start the computer and enter the system, or you will be prompted to the following and a specified time to shut down the computer:

In addition, say the solution in the case of lost USB flash drive.

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

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

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.