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