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

  1. Press Windows Key + R to open the Run dialog box.
  2. Type regedit and press Enter or click OK.
  3. 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.

  1. In the Registry Editor address bar, navigate to the following path:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR
  2. In the right pane, locate the DWORD value named Start.

  3. Double-click Start to open its properties.

  4. Change the Value data from 3 (Default/Enabled) to 4 (Disabled).

  5. 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.

  1. Navigate to the following path:

    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows
  2. Check if a key named DeviceInstall exists under Windows. If not, right-click Windows, select New > Key, and name it DeviceInstall.

  3. Under DeviceInstall, check for a key named Restrictions. If it does not exist, right-click DeviceInstall, select New > Key, and name it Restrictions.

  4. Select the Restrictions key.

  5. In the right pane, right-click an empty area, choose New > DWORD (32-bit) Value, and name it DenyRemovableDevices.

  6. Double-click DenyRemovableDevices, change its Value data to 1, 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).