RSS:
Publications
Comments
Dexternights..

Daily dose of IT, Hardware,
Cell phones and other technology

How to block or Disable USB Flash drives in Windows XP

This Post talks answers the below queries.

1. How to block USB Mass storage – Flash memory drives , USB Flash Memory devices in Windows XP based PCs?

2. How to remove ability to install new ?

3. How to disable autorun feature of USB drives ?

Next post answers

3. How to enable Blocked USB mass storage devices or flash memory devices in corporate networks?

—-

Typically USB Mass storage devices like USB Flash drives or Pen Drives or similar devices (Sandisk,Transcend ,U3 Micro cruzer, Kingston ) and Portable Hard disk drives like Seagate,Western Digital etc or any USB mass storage device can be blocked in Windows XP PCs by editing registry and removing some driver files/making the files protected.

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.

Follow dexternights on Twitter

15 Comments to How to block or Disable USB Flash drives in Windows XP

  1. ray's Gravatar ray
    April 21, 2009 - 8:38 pm | Permalink

    if i will to restrict all but onli 1 available usb port…is it possible?

  2. Recycled Flash Drives's Gravatar Recycled Flash Drives
    April 24, 2009 - 9:56 pm | Permalink

    Enjoying reading your blog. Hard work always pays off.

  3. Ali's Gravatar Ali
    June 9, 2009 - 11:00 pm | Permalink

    waht if the “run” is desibled and the registry desibled also by admin?

  4. June 15, 2009 - 8:13 pm | Permalink

    This did not stop my employees to connect their Nokia phones and use the memory of the phone. Any chance to stop them using mobile phones or any kind of device with storage capabilities?

  5. chandra sekhar's Gravatar chandra sekhar
    June 17, 2009 - 3:16 pm | Permalink

    You can run “regedit.exe” file from %systemroot%\windows if you are unable to access ‘Run’ command. for ex : c:\windows\regedit.exe

  6. prabhjot's Gravatar prabhjot
    February 4, 2010 - 1:58 pm | Permalink

    This is not useful dear

  7. February 9, 2010 - 7:44 am | Permalink

    Hi your tip is a life saver, I gonna impliment this in my client’s computer. Good Job ! Thanks a lot.

  8. Asif Nadeem's Gravatar Asif Nadeem
    March 4, 2010 - 9:04 pm | Permalink

    when we use another usb (different company make) the value of USBSTOR is automatically changed from 4 to 3. what we do that the value is remian 4 ?

  9. January 18, 2011 - 8:08 am | Permalink

    Hi, thanks for the info and cleaner way to do the job!

  10. February 19, 2011 - 10:38 am | Permalink

    hi my name is sunil verma how to disable pen drive other method

  11. shinu sebastian's Gravatar shinu sebastian
    March 18, 2011 - 5:31 pm | Permalink

    it worked for me in wiondows 7 .But the device name has not been changed…..

  12. Rashidi's Gravatar Rashidi
    June 27, 2011 - 9:59 am | Permalink

    Excellent Job.

    Works to block everything I wanted. Including Phones. BTW, tested with Nokia 5800 & Blackberry Bold 9700. BB software was already installed. The Nokia has not been plugged into the PC before. But both was not detected. So I’d say this tip works like a charm.

    Thanks.

  13. bhuwnesh's Gravatar bhuwnesh
    September 25, 2011 - 12:22 pm | Permalink

    sorry but this registry editing techiniq is not working

  14. February 25, 2013 - 12:01 pm | Permalink

    What’s Going down i am new to this, I stumbled upon this I have found It absolutely helpful and it has aided me out loads. I’m hoping to give a contribution &
    assist other customers like its helped me. Good job.

  1. on May 25, 2012 at 9:33 pm

Leave a Reply

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*