How To Disable a USB Flash Drive (Mass Storage Devices Only)

Whenever you insert a USB flash drive into your computer, the flash drive is detected automatically by Windows and then opened. Here I am going to show you how to stop your USB Flash Drives Mass Storage Only through registry.

This trick can also be done through My Computer by using Device Manager but that one stops all the USB connections. This is not recommended.

So are you ready to start?

Here we go.

  1. Click Start Menu > go to run command and type "regedit" without quotes. Registry Editor will open.
  2. Expand the HKEY_LOCAL_MACHINE folder then SYSTEM >CURRENT CONTROLL SET > SERVICES >USBstor, located at the left pane.
  3. Find "Start" in the right pane with the blue icon.
  4. Double click "Start". A box titled "Edit DWORD value" will open.
  5. Write down "4" in the "Value Data" Field. Illustration 1.1
  6. Click OK and then close the Registry Editor.

Illustration 1.1

Your USB flash drive is now disabled. Whenever you insert a flash drive, Windows won't detect it and will not open it.

To enable it again, repeat steps 1 through 4 and then change the value to 3. The default value for enabling a USB flash drive is 3.

Note: Performing this trick will only Disable USB Mass Storage devices and will not affect other USB Devices such as USB Keyboard, USB Mouse, Scanner, Printer etc....always backup your registry to prevent losing your valuable data.


Share this article!

Follow us!

Find more helpful articles:



Hi Jameel

A very useful tip! I wonder if it may help users to remind them to backup their registry or at least create a system restore point before doing any work on their windows registry?


By Rik Whittaker