If you want to disable access to removable storage devices and ports in a Windows 11/10 PC, you can use the Local Group Policy Editor or the Registry Editor to do so.
Let’s assume that your computer has significant private or confidential data, and you do not want to let others copy them to a USB drive. Alternatively, let’s think you do not wish to allow others to use any USB device, such as a wired printer, keyboard, mouse, external hard drive, etc. You then need to disable removal storage classes.
Disable Removable Storage classes in Windows 11/10
To disable removable storage classes in Windows, using the Group Policy Editor, follow these steps:
- Press Win+R to open the Run prompt.
- Type gpedit.msc and hit the Enter button.
- Go to Removable Storage Access in Computer Configuration.
- Double-click on All Removable Storage classes: Deny all access.
- Select the Enabled option.
- Click Apply and OK.
Open the Local Group Policy Editor. For that, press Win+R to open the Run prompt, type gpedit.msc
, and press the Enter button. After opening it, navigate to the following path:
Computer Configuration > Administrative Templates > System > Removable Storage Access
In Removable Storage Access, you will see a setting called All Removable Storage classes: Deny all access. Double-click on it and select the Enabled option.
Now, click on Apply and OK to save the change.
Read: How to disable or enable USB Read/Write Protection on Windows
Disable removable storage access in Windows 11/10
To disable removable storage access in Windows, follow these steps-
- Press Win+R to open the Run prompt.
- Type regedit and hit the Enter button.
- Click the Yes button.
- Navigate to Windows in HKLM.
- Right-click on Windows > New > Key.
- Name it as RemovableStorageDevices.
- Right-click on RemovableStorageDevices > New > DWORD (32-bit) Value.
- Name it as Deny_All.
- Double-click on Deny_All and set the Value data as 1.
- Click OK.
Let’s check out these steps in detail.
Before getting started, it is recommended to backup all Registry files and create a System Restore point.
Press Win+R, type regedit
, and hit the Enter button. If the UAC prompt appears, click the Yes button to open the Registry Editor on your computer. Following that, navigate to this path-
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows
Right-click on Windows > New > Key, and name it as RemovableStorageDevices. After that, right-click on RemovableStorageDevices > New > DWORD (32-bit) Value, and name it Deny_All.
Double-click on Deny_All to set the Value data as 1, and click the OK button to save changes.
That’s all! After that, all the USB storage devices will not work on your computer.
Read: USB drive not appearing in This PC but visible in Disk Management
How do I lock my USB storage?
We can use Windows’s Encryption feature to ensure that the USB drive is accessible only on the same PC. The feature (Encrypt contents to secure data) is available under the Properties > General > Advanced section.
How to restrict access to a USB drive?
One can use the Usbstor.pnf and Usbstor.inf files to restrict access to a user or a group. The security setting of these files can be set so that only a particular user or group can access them. However, this will apply to all USB drivers.