Wednesday, April 1, 2009

How to Block or Disable Installation of USB / Flash Drives

Step 1 : If the device is not installed already and you need to block any new installations
The access to following files can be restricted.

%SystemRoot%\Inf\Usbstor.pnf
%SystemRoot%\Inf\Usbstor.inf


Where %SystemRoot% is C:\Windows\System32\ Folder if windows is installed in C. Replace the drive letter based on installation.

Hence you should look for these files under


C:\Windows\System32\Inf\Usbstor.inf


This file has driver information about USB Mass storage devices. If this file is made restricted or deleted, users cant install new Flash drives or any USB hard drives. [This will not affect other USB devices like Mouse, keyboard etc]. When we say restricted make the file accessible only to administrators, if you are talking about kiosk, internet center PC just delete the Usbstor.inf file so no one can install it.

2. If your USB mass storage device is already installed then change the below registry entry value to 4. Its default value is 3 which is USB Mass storage devices enabled condition.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor


When you do this, the USB storage device does not work when the user connects the device to the computer.
To set the Start value, follow these steps:

1. Click Start, and then click Run.
2. In the Open box, type regedit, and then click OK.
3. Locate and then click the following registry key:
4. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor
5. In the details pane, double-click Start.
6. In the Value data box, type 4, click Hexadecimal (if it is not already selected), and then
7. click OK.
8. Exit Registry Editor.

Your USB Mass storage devices will not be detected if this value is changed. This will NOT affect Mouse,Keyboard or any other USB hardware.

1 comment:

  1. Statistics show that people who have already bought a factory refurbished computer will never buy 'new' computer again!

    ReplyDelete