Disable USB and Other Devices

Source: Internet
Author: User

Post:

The reason why the company disables USB flash drives and mobile hard drives is varied. The loudest reason is to prevent employees from taking away confidential information. Here I provide you with tips that do not require professional software, because your boss always believes that "you can solve the problem, don't spend money ".

 

Method 1: BIOS setup)

Go to BIOS settings, select the "Integrated peripherals" option, and then set the "USB 1.1 controller" and "USB 2.0 contr01ler" options to "disableed" to disable the USB interface. Finally, do not forget to set a password for the bios, so that others will not be able to unlock the above device by modifying the registration table.

Note: This method completely disables the USB interface. That is to say, all USB interfaces cannot be used, including USB disks and mobile disks. Please use it with caution because it is too aggressive.

 

Method 2: Disable the startup of a flash drive or mobile hard drive (applicable to Windows XP/2000/2003)

Open the Registry Editor, expand the following branch [HKEY_LOCAL_MACHINE \ SYSTEM \ currentcntrolset \ Services \ usbstor], find the DWORD Value "start" in the right pane, and double-click, in the displayed edit dialog box, change the value to the hexadecimal value "4 ". Click OK to close the Registry Editor and restart the computer for the settings to take effect. When a USB storage device is connected to a computer, although the indicator on the USB device is flashing normally, its drive letter cannot be found in the resource manager, therefore, the USB device cannot be used.

 

Method 3: Hide drive letters and disable viewing (applicable to Windows)

Open the Registry Editor, expand the following branch [HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ ploicies \ Explorer], and create the binary value "nodrives". The default value is 00 00 00, indicates that no drive is hidden. The key value consists of four bytes. each bit of each byte corresponds to a disk from a: to Z:. When the corresponding bit is 1, the corresponding drive in my computer is hidden. The first byte represents the eight disks from A to H, that is, 01 is A, 02 is B, 04 is C ...... Likewise, the second byte represents I to P, the third byte represents Q to X, and the fourth byte represents Y and Z. For example, to disable drive C, change the key value to 04 00 00 00; To disable drive D, change to 08 00 00 00; To disable drive C and drive D, then it is changed to 0C 00 00 00 (C is in hexadecimal format, and it is changed to 12 in decimal format ).

After understanding the principle, the following uses my computer (smiling) as an example to describe how to operate: My computer has a soft drive, a hard drive (five partitions), and an optical drive, drive letter distribution is as follows: A: (3.5 floppy disk), C:, D:, E:, F:, G:, H: (CD ), so my "nodrives" value is "02 FF", hiding B, I to Z disk.

After restarting the computer, insert a USB flash drive, which is invisible to my computer, but enter I in the address bar: (H is the last drive letter after the power of my computer) you can still access the Mobile Disk. Now, we can see that "nodrives" is just a blind method, so we have to take one more step, that is, to create a new binary "noviewondrive" and change the value to "02 FF ", that is to say, the value is the same as "nodrives. In this way, neither the USB flash drive nor the USB flash drive can be accessed.

 

Method 4: Disable USB Driver Installation

In Windows Resource Manager, go to the "System Disk: \ windows \ inf" directory and find the name "usbstor. PNF file, right-click the file, select "properties" in the pop-up menu, and switch to the "Security" tab, in the "Group or user name" box, select the user group to be banned, select the "deny" check box next to "full control" in the user group permission box, and click "OK.

Then, use the preceding method to find the "usbstor. inf" file and set it on the Security tab to deny access to the group's users. The operation process is the same as above. After the preceding settings are complete, the user in the group cannot install the USB device driver, so as to disable the driver.

Note: To use the access control list (ACL), you must use the NTFS file system.

 

Conclusion

After the above four steps, even a Chinese master wants to find a breakthrough in the defense line, it will take a great deal of trouble. Sometimes it is not necessarily a solution provided by others to solve the problem, that's for money. For the boss, asking for money is the same as asking for his life.

 

 

 

Use the following code to disable USB:

 

Using Microsoft. Win32;
//
{
// Disable USB
Registrykey keylocalmachine = registry. localmachine;
Registrykey key = keylocalmachine. opensubkey (@ "SYSTEM \ currentcntrolset \ Services \ usbstor", true );
Key. setvalue ("START", 4 );
//
// Enable USB
Registrykey keylocalmachine = registry. localmachine;
Registrykey key = keylocalmachine. opensubkey (@ "SYSTEM \ currentcntrolset \ Services \ usbstor", true );
Key. setvalue ("START", 3 );
//

}

 

The "start" key is the work switch of the USB device. The default value "3" indicates manual, "2" indicates automatic, and "4" indicates disabled.

 

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.