How to Prevent Others from Installing USB Flash Drive/External Hard Drive in Windows 11

Removable storage disks, such as USB Flash Drives or External Hard Drives, can compromise the security of data on your PC. In the ways below, you can prevent others from using it.

Windows 11 users can connect portable storage devices, such as USB flash drives, external hard drives, and other forms of mass storage devices, to view, export, or transfer data if there is a USB or other compatible connection.

While the use of removable drives is common, there are situations where restrict access to these devices.

For example, restrict access to prevent users from connecting USB Flash Drives or USB Storage that may contain malware that could harm your computer.

To prevent people from stealing important data from your computer using USB storage devices, you can block the use of USB storage devices on the computer.

You can restrict access to removable storage drives or completely prohibit removable storage devices from connecting to your computer via a USB connection to do this.

Whatever your reason, Windows 11 gives you the option to disable access to all portable storage devices using Group Policy Editor or Registry.

Prevent Others from Installing Portable Storage Devices Through Group Policy Editor

  1. Open the “Group Policy Editor“. You can open it by using the keyboard shortcut (WIN + R), then type “gpedit.msc” and click the OK button.
  2. Next, in the Group Policy Editor, navigate to “Computer Configuration >> Administrative Templates >> System >> Device Installation >> Device Installation Restrictions“.
Gpedit Prevent installation of removable devices
  1. Double-click on “Prevent installation of removable devices” to edit.
  2. Then on the dialog box select “Enabled” and click the OK button to save the changes.

Prevent Others from Installing Portable Storage Devices Through the Registry

  1. Open the “Registry Editor“. You can open it by using the keyboard shortcut (WIN + R), then type “regedit” and click the OK button.
  2. Next, in the Registry Editor, navigate to “HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows“.
  3. Right-click the Windows Folder and select “New >> Key“. Name the key “DeviceInstall“.
  4. Then in the DeviceInstall folder that you just created, create a new key again with the name “Restrictions“.
  5. In the Restrictions folder, right-click on the right-hand panel and select the “New > DWORD (32-bit) Value” option. Name it “DenyRemovableDevices“.
regedit Prevent Removable Storage Devices
  1. Double-click your newly created DenyRemovableDevices to edit.
  2. Set the value “Value data” with a value of “1” to prevent others from installing portable storage devices. A value of “‘0” allows portable storage devices to be installed.
  3. Click the OK button to save.
  4. Restart your computer.

Latest Articles