Homemade U disk Unplug tips software

Source: Internet
Author: User

When the use of U disk in the company, whether will often forget to remove the U disk, causing unnecessary trouble. There is no computer shutdown before the prompt to unplug the U disk software it? Yes, let's teach you to make one yourself.

First, enter the following contents in the Notepad program:

On Error Resume Next

Dim FSO, D,dc,f

Set fos = CreateObject ("Scripting.FileSystemObject")

Set DC = fso,drives

For each D in DC

Set f = fso. GetFile (D & "Please take me home. txt")

If Left (f,2) =d Then MsgBox "I am Your:" &d& "plate, please take me home!", vbcritical, "Host: Hello!"

Next

After the input is good, save the file in the C-packing directory and name it usbdisk. vbs.

Second, click "Start-run",

Enter "Gpedit.msc" and press ENTER to open the Group Policy Editor.

Expand Computer Configuration-windows Settings-script (Start/shutdown) in turn,

Double-click to open the "shutdown" item, and then click "Add" to add the Usbdisk previously saved in C. VBS file, and then exit the Group Policy Editor after determining.

Third, when you need to close the machine with your USB disk or mobile hard drive to the directory, to create a file named "Please take Me home. txt" text file. Later, if you do not pull out a U disk or mobile hard drive, the system will pop-up warning box prompts you! How, very simple, try!

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.