Add nodrives to the Registry to hide the drive letter (disable the USB flash drive) parameter description

Source: Internet
Author: User

To disable the USB interface, you can create a new key "nodrives" at the HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer location in the registry. The type is REG_DWORD, hide a drive letter, and create a new key "noviewondrive". The type is REG_DWORD. By setting its value, access to a drive is prohibited.

These should be well understood. USB flash drives can also be disabled. But the problem lies in "setting its value". How can I set it?

There are "details" on the Internet about how to set it up, but it is too obscure. I guess you can copy it and I don't know what it means. I just posted a tutorial on the Internet, the person reading the tutorial is notAlgorithmErrors are completely incomprehensible. I was deeply affected by this problem. At last, I could not go to msdn to view the English documents to understand what was going on.

After talking so much nonsense, let's get started.

Parameter rules: In the Registry, the key type REG_DWORD indicates the 32-bit unsigned number. If it is represented in binary, it indicates abcdefghjiklmnopqrstuvwxyz, if you want to disable a drive, write the corresponding bit as 1. If it is not disabled, write 0. The relationship is as follows:


All Drives are disabled.

If only disk A, disk C, and disk D are retained and all others are disabled, write them as follows:

We can see that we actually constructed a binary representation in alphabetical order, converted the binary representation into a hexadecimal representation, and saved it to the "nodrives" key and "noviewondrive" key, in this way, the disabled drive cannot be displayed or accessed.

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.