Use script code to make U disk boot lock

Source: Internet
Author: User
Tags ukey

First, we open Notepad, enter the following content and save as Ukey.bat.

@echo off

If not exist e:/test.txt Shutdown-s-T 0

For an explanation of scripting code:

1.e:/test.txt you can set your own file name and type, such as Jannick.jpg or Jannick.exe, the key is e:/, first you have to know what your computer to the U disk to give the letter, such as my is e disk, you may be different, please adjust their own.

2. Any search for a file, named Test.txt and put it in the root directory of U disk, the file name is the same as above.

3.shutdown parameters I do not explain too much, want to study the can be entered under cmd shutdown/? Look at the detailed instructions, I am here to shut down the machine.

XP system users have direct access to the following folders, but to open the show System folder contents in Folder Options, copy Ukey.bat to the destination folder. %systemroot%/system32/grouppolicy/user/scrīpts/logon.

Second, next, click Start-run-gpedit.msc-Computer Configuration-windows Settings-script-Add, find your ukey.bat and add in-ok-ok, OK.

In this way, a simple USB u disk boot lock on the production is completed, the next time you turn on the computer must be inserted on the U disk to start, remember Oh! Keep your U disk boot lock, do not lose or the U disk damaged, so it will be trouble.

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.