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.

Click Start Menu > go to run command and type “regedit” without quotes. Registry Editor will open.

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

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.