windows - How to make a computer not detect flash drive?

08
2014-07
  • MAKZ

    One of my acquaintances often comes to me with his pen drive and uses my laptop for a long time, which gets me annoyed.

    How do I make my machine temporarily not detect any external flash drive ?

  • Answers
  • Zaroth

    Use regedit and modify value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor to 4. When you want USB drives to work again, change it back to whatever it was before (probably 3).

    There are also tools that do it for you automatically.

    Source: https://support.microsoft.com/kb/823732/en

  • LDC3

    Go to Control Panel, Device Manager and disable the USB drivers.


  • Related Question

    windows - Which programs are using my USB flash drive?
  • user712092

    Sometimes when I follow the process to safely remove a USB flash drive, I get told that I can't remove the drive because some programs are using it. However I'm unable to tell which programs these are, so I end up having to close programs - sometimes even randomly.

    How do I find out which program is using my USB flash drive?

    I've searched the Internet but have found nothing promising; one solution might be via Process Explorer since it shows handles, but I don't know how to use it to solve my problem.

    The best solution would be to have a program that can automatically close these programs for me, or at least tell me which programs these are.


  • Related Answers
  • Darth Android

    This tool and this tool both look like they would serve the purpose you are trying to achieve. The NirSoft interface is a little less direct, but I trust the author and his ability to write code. The second seems to have a more useful UI in your situation, but I have no history with the website or author.

    ProcessExplorer is another easy way to do it, simply open up ProcessExplorer, hit Ctrl+F, and then type the name of the file. ProcessExplorer will list all the programs using that file. If the WhoLockMe tool doesn't work for you, I'd recommend ProcessExplorer next, simply because it has so many other useful features.

  • Leftium

    I use EjectUSB (working download link):

    EjectUSB could be considered the nuclear option of USB drives that just won't properly eject in Windows, because there's an "application or process" accessing it. Put EjectUSB on your thumb drive and run it, and the program will mercilessly kill every program, process, or anything else touching your drive, letting you safely remove it without any fear of data loss.

  • Neradullmoment

    In Windows 7 Pro, this works:

    1. Open "My Computer"
    2. Find the USB drive in question
    3. Right click on the USB drive
    4. Click on "eject"; you will now get the "...in use..." message - note that it has a "Continue" button!
    5. Click "Continue" to force the un-mount and you should be all set.

    As per a prior answer, it's probably a good idea to make sure that the USB stick is set to be optimized for quick removal. That SHOULD ensure no open writes.... ymmv

  • music2myear

    ProcMon by Sysinternals would allow you to watch all file and registry activity and allows you to filter only those entries referencing your thumbdrive. This may be a more thorough way to telling each and every process that is using your drive.

    Also, depending on your Windows version, there may be default apps using the drive.

    If Win7, check if SuperFetch is enabled on your USB thumb drives. If XP, check if disk write caching is enabled.

    SuperFetch allows windows to use temporary storage as additional "RAM", moving the disk cache off the system drive. Disk write caching allows file transfers to and from removable disks to appear to go faster by actually occuring in the background and during system idle times.

  • 8088

    I believe this is connected with Windows Indexing. See the following link:

    How do I keep Windows 7 System from touching my USB flash drives when I use them?

  • afrazier

    I see this randomly on NTFS-formatted external drives (both HD and Flash). Even when they are set to "Optimize for Quick Removal" in Device Manager, something in the system (probably the filesystem driver) is holding onto something that it shouldn't. No tool I've found is able to even display what resource is being held, and Process Explorer doesn't show any open handles to the device or any of its files.

    The only recourse I've found is either shutting down the system or using Sysinternal's sync tool to flush all the filesystem buffers and just yank the cord. When I do a "dirty" pull, I'll immediately reattach, run chkdsk, and be able to eject the drive normally afterwards.

  • Dinesh Manne

    After trying many tools i settled for Unlocker which helps in the scenarios where Windows complains about locked files etc. You can get it at http://www.filehippo.com/download_unlocker/. While nirsoft utility and Process Explorer work, i think they are meant for advanced users. For a quick get out if the way solution Unlocker works.