How to Disable USB Storage Devices Using Regedit
Restricting unauthorized USB storage devices is an essential security measure to prevent data leaks and protect systems from malware. This guide provides a direct, step-by-step walkthrough on how to configure the Windows Registry via Regedit to block the installation and usage of USB mass storage devices.
Step 1: Open the Registry Editor
- Press
Windows Key + Rto open the Run dialog box. - Type
regeditand press Enter or click OK. - Click Yes when prompted by User Account Control (UAC).
Step 2: Disable the USB Storage Driver (USBSTOR)
Modifying the USBSTOR service prevents the operating
system from loading the driver for any connected USB mass storage
device.
In the Registry Editor address bar, navigate to the following path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTORIn the right pane, locate the DWORD value named Start.
Double-click Start to open its properties.
Change the Value data from
3(Default/Enabled) to4(Disabled).Set the Base to Hexadecimal and click OK.
Step 3: Prevent the Installation of Removable Storage Devices
To explicitly block Windows from installing new removable storage devices, apply a restriction policy via the registry.
Navigate to the following path:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsCheck if a key named DeviceInstall exists under
Windows. If not, right-click Windows, select New > Key, and name itDeviceInstall.Under
DeviceInstall, check for a key named Restrictions. If it does not exist, right-clickDeviceInstall, select New > Key, and name itRestrictions.Select the Restrictions key.
In the right pane, right-click an empty area, choose New > DWORD (32-bit) Value, and name it
DenyRemovableDevices.Double-click
DenyRemovableDevices, change its Value data to1, and click OK.
Step 4: Apply Changes
Restart the computer or open the Command Prompt as an administrator
and run gpupdate /force to ensure all policies and registry
adjustments take immediate effect. Any connected or newly inserted USB
storage drive will now be blocked from installing and functioning.
How to Re-enable USB Storage Devices
To restore standard USB access: - Change the Start value
in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR
back to 3. - Change DenyRemovableDevices in
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeviceInstall\Restrictions
to 0 (or delete the entry).