Tuesday, December 15, 2009

How To Block Pen Drives/USB Drives in Windows XP

USB Mass Storage Devices (Pen Drives) are now been a major source of virus/spyware attack to your computer sytem, especially where a computer system is shared by a group of persons. One cannot deny the fact the USB drives have now made data porting simple and easy.
Whenever a new USB deivce is plugged into a Windows XP machine, the operating system (XP) loads a device driver named "usbstor.sys". So, if this driver file can be prevented from loading, usage of USB mass storage devices can be blocked. As in the case of every other driver files, information regarding this file also is stored in a sytem database called the 'Registry'. Extreme care is to be taken while dealing with this database, that mistyping a single letter may turn your computer sytem non-functional.
Here is a step-by-step procedure to edit the 'registry' to preven USB mass storage devices from loading.
  1. Click on Start and select 'Run' from the pop-up window
  2. Type regedit - This will open the registry editor
  3. In the left pane, goto My Computer\HKEY_LOCAL_MACHINE\System\Current-ControlSet\Services\USBSTOR
  4. Double click on Start in the right pane
  5. Change the Value Data field to 4
  6. Press OK - This will save the value

Now, try the new setting by inserting a USB Pen Drive. Sure, windows will not recognize it.

To revert back to the original setting, follow the steps 1 to 4 explained above and set the value to 3

Machine will now start recognizing your pen drives. No restart is needed in both cases.

2 comments:

Anonymous said...

Your suggestions are highly useful

Anonymous said...

Hi Sreerej Sir,
This is Eldho from Pongummoodu.
I have been looking for a solution to this problem for the past few years.Thanks for your wonderful article