Why when extracting. Disconnecting USB devices without using the Safely Remove Hardware function. Removing USB controller drivers

Sometimes it becomes necessary to disable USB ports on a computer or laptop in order to limit access to connect flash drives, hard drives and other USB devices. Disabling USB ports will help prevent the connection of any drives that could be used to steal important information or cause a virus to infect your computer and spread malware across the local network.

Restricting access to USB ports

Let's consider 7 ways, with which you can block USB ports:

  1. Disabling USB through BIOS settings
  2. Changing registry settings for USB devices
  3. Disabling USB ports in Device Manager
  4. Uninstalling USB controller drivers
  5. Using Microsoft Fix It 50061
  6. Using additional programs
  7. Physically disconnecting USB ports

1. Disabling USB ports through BIOS settings

  1. Enter BIOS settings.
  2. Disable all items related to the USB controller (for example, USB Controller or Legacy USB Support).
  3. After you have made these changes, you need to save the settings and exit the BIOS. This is usually done using the key F10.
  4. Restart your computer and make sure the USB ports are disabled.

2. Enable and Disable USB Drives Using Registry Editor

If disabling via BIOS does not suit you, you can block access directly in the Windows OS itself using the registry.

The instructions below allow you to block access to various USB drives (for example flash drives), but other devices such as keyboards, mice, printers, scanners will still work.

  1. Open the Start menu -> Run, enter the command " regedit" and click OK to open the Registry Editor.
  2. Continue to next section

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR

  3. On the right side of the window, find the item “ Start” and double-click on it to edit. Enter value " 4 » to block access to USB storage devices. Accordingly, if you enter the value again “ 3 ", access will be reopened.

Click OK, close Registry Editor, and restart your computer.

The above method only works when the USB controller driver is installed. If a driver has not been installed for security reasons, the Start setting may be automatically reset to 3 when the user connects the USB drive and Windows installs the driver.

3. Disable USB ports in Device Manager

  1. Right-click on the " Computer" and select the "Properties" item in the context menu. A window will open on the left side of which you need to click on the link “ device Manager».
  2. In the device manager tree, find the item " USB controllers" and open it.
  3. Disable controllers by right-clicking and selecting the "Disable" menu item.

This method doesn't always work. In the example shown in the figure above, disabling the controllers (the first 2 points) did not lead to the desired result. Disabling the 3rd option (USB Mass Storage Device) worked, but this only allows you to disable a single instance of the USB storage device.

4. Removing USB controller drivers

Alternatively, to disable the ports, you can simply uninstall the USB controller driver. But the disadvantage of this method is that when the user connects a USB drive, Windows will check for drivers and, if they are missing, will offer to install the driver. This in turn will allow access to the USB device.

5. Prevent users from connecting USB storage devices using a Microsoft application

Another way to deny access to USB drives is to use Microsoft Fix It 50061(http://support.microsoft.com/kb/823732/ru - the link may open near the mituta). The essence of this method is that 2 conditions for solving the problem are considered:

  • The USB drive has not yet been installed on the computer
  • The USB device is already connected to the computer

Within the framework of this article, we will not consider this method in detail, especially since you can study it in detail on the Microsoft website using the link given above.

It should also be noted that this method is not suitable for all versions of Windows OS.

6. Using programs to disable/enable access to USB storage devices

There are many programs for setting a ban on access to USB ports. Let's consider one of them - the program USB Drive Disabler.

The program has a simple set of settings that allow you to deny/allow access to certain drives. USB Drive Disabler also allows you to configure alerts and access levels.

7. Disconnecting USB from the motherboard

While physically unplugging USB ports on a motherboard is nearly impossible, you can unplug ports on the front or top of your computer by unplugging the cable that goes to the motherboard. This method will not completely block access to USB ports, but will reduce the likelihood of using drives by inexperienced users and those who are simply too lazy to connect devices to the back of the system unit.

! Addition

Denying access to removable media through the Group Policy Editor

In modern versions of Windows, it is possible to restrict access to removable storage devices (including USB drives) using the Local Group Policy Editor.

  1. Run gpedit.msc through the Run window (Win + R).
  2. Go to the next branch " Computer Configuration -> Administrative Templates -> System -> Access to Removable Storage Devices»
  3. On the right side of the screen, find the “Removable drives: Deny read” option.
  4. Activate this option ("Enable" position).

This section of Local Group Policy allows you to configure read, write, and execute access for different classes of removable media.

If you simply unplug the USB device from the port while the computer is on, you won't get into trouble. There is a risk of losing files, disrupting applications, or even the entire operating system. But safely removing devices doesn't always work.

Most often, there is no problem with this: just click on the “Safely Remove Hardware” icon in the notification area (system tray) and select the desired disk. As soon as a message appears indicating that the device can be safely removed (Safe To Remove Hardware), the drive can be disconnected.

But sometimes Windows instead announces that the device is still in use (This device is currently in use) - without specifying, however, which process. And without this information it is not easy to solve the problem.

To begin with, you can try to act at random. Close all Windows Explorer windows and any programs that may be using files on the disk, and then try to safely remove it again.

If it doesn’t help, you can simply turn off the computer - not put it to sleep, but turn it off completely. This always helps, but it is time consuming and disrupts the workflow.

There is an easier way: log out, log in again and try Safely Removing Hardware again. This is faster than a complete shutdown and startup, and the problematic process will most likely end when you log out. However, such manipulations also take a lot of time.

That's why I prefer . The utility not only allows you to delete files that cannot be deleted using Windows tools, but also frees up drives connected to your computer. The program is completely free, although users are encouraged to donate $5 to its development.

Download and install the utility, and the next time Windows announces that “the device is still in use,” right-click on the disk and select “Unlocker.” The program will tell you which processes are causing the problem and offer solutions. Unlocker can interrupt all processes, but at the same time there is a risk of disrupting the normal operation of Windows. In addition, the utility can try to free files without interrupting the processes that are using them.

I, however, prefer to make do on my own. Once you've figured out which process is causing the problem, it's easy to guess what application you need to close - the process and program names are usually the same. So you can simply shut down the problematic application manually, saving all files, and then use the safely remove device function.

A situation often occurs when it is not possible to disconnect a flash drive from a computer in safe mode. When disconnected, a window appears with information that the device is still in use. You can disconnect the flash drive only after closing all programs that use your flash drive.

How can you find programs that prevent the flash drive from being safely removed? At my previous job, I often had cases where I seemed to have finished working with a flash drive, closed all the files, and when disconnected it still says that the device is still in use. I didn’t have enough nerves and I simply disconnected the flash drive from the USB port. But having destroyed several flash drives in this way, I decided to think about how to figure out what exactly the flash drive was doing at the time of shutdown.

This is actually the message that appears when you want to disconnect a flash drive that is being used by some program, or a file is opened from it

The device is still in use. Quit all programs and close any windows that may be using this device, and then try again.

Fortunately, kind programmers have written a special program with which you can figure out what kind of process or file is “holding” the flash drive and does not allow it to be turned off.

This program is called Dev Eject. Its essence is to find the process that is currently occupying your flash drive; you can disable this process from the program and then safely remove the flash drive.

After installation, run the program and select your flash drive

Now click “ Eject” to safely disconnect the flash drive, if the flash drive is occupied by some program, a window like this will appear:

As you can see, this window shows the process that is currently using the flash drive. In my case it is an image viewer. I forgot to close the picture, which is on the flash drive. In order not to look for where you have this picture open, just right-click on the process and select “ Kill process

After disabling the process, close the window and click “ Eject“, now the flash drive can be unmounted without any problems.

Safely removing hardware is typically used to remove a USB flash drive or external hard drive in Windows 10, 8 and Windows 7, as well as XP. It may happen that the safe eject icon has disappeared from the Windows taskbar - this may cause misunderstanding and lead to confusion, but there is nothing to worry about. Now we will return this icon to its place.

Note: in Windows 10 and 8, for devices that are defined as a Media device, the safe eject icon is not shown (players, Android tablets, some phones). You can disable them without using this function. Also keep in mind that in Windows 10, the display of the icon can also be disabled in Settings - Personalization - Taskbar - “Choose the icons displayed in the taskbar.”


Sometimes, for unknown reasons, the safe removal icon may disappear. Even if you connect and disconnect the flash drive over and over again, for some reason the icon does not appear. If this happens to you (and this is most likely the case, otherwise you would not have come here), press the Win + R buttons on your keyboard and enter the following command into the Run window:

RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll

This command works on Windows 10, 8, 7 and XP. The absence of a space after the comma is not an error, it should be so. After running this command, the Safely Remove Hardware dialog box that you were looking for will open.

In this window, you can, as usual, select the device that you want to disable and click the “Stop” button. A side effect of running this command is that the safe eject icon will reappear where it should be.

If it continues to disappear and each time you need to re-execute the specified command to remove the device, then you can create a shortcut for this action: right-click on an empty space on the desktop, select “New” - “Shortcut” and in the “Object location” field » enter the command to open the Safely Remove Hardware dialog. At the second stage of creating a shortcut, you can give it any desired name.

Another way to safely remove your device in Windows

There is another simple method that allows you to safely remove your device when the Windows taskbar icon is missing:

This concludes the instructions. I hope the methods listed here to safely remove a portable hard drive or flash drive will be sufficient.

Most computer and laptop users know that a USB drive must not only be pulled out of the port to end its use in the system, but also a special procedure called safe removal must be launched. If a flash drive is removed without safe removal, the consequences can be catastrophic (data loss, file system errors, and even failure of the device itself). Let's consider several simple methods that allow you to carry out such a procedure, as well as restore such a Windows tool if for some reason it disappeared or became inaccessible.

Safely removing a flash drive: why is this necessary?

When removing a USB drive from the corresponding slot on a computer terminal, it is important to understand one thing. Safely removing a USB flash drive in Windos 10 or any other system is akin to the standard procedure for shutting down the computer itself.

In this case, all processes associated with the device are terminated and power is cut off. In this way, the drive can be protected from many problems. An analogue could be turning off a running computer from the network. Many people have noticed that after this the system recovery begins. It’s the same here, but you’ll have to do it manually, which can be much more complicated than automated processes in Windows.

Basic Methods for Safely Removing USB Devices

So, you can safely remove a flash drive using several of the simplest methods that are provided in Windows systems.

The easiest way is to left-click on the USB icon in the system tray and select the corresponding line. If the icon is not displayed for some reason, you need to click on the up arrow to show hidden icons.

The second method that allows you to safely remove a flash drive is to use “Explorer” or double-click on the computer icon where the USB device is selected, and right-click to select the extraction option in the menu. Most people have no questions about this.

Safely removing a flash drive: USB Safely Remove program

In some cases, if someone does not like the standard method, you can use a small program called USB Safely Remove (this can be useful in cases where the system reports that access to the device cannot be terminated, or the device icon is missing in the tray) .

After installation, the program creates its own tray icon in the form of clicking on which, you can see all the USB devices currently connected to the computer system. There is also a section for hidden devices (USB camera, external network cards, disks, etc.). Just select your drive and indicate how to safely remove the flash drive.

Terminating processes using the drive

Sometimes, however, the system produces an error. In this case, you should close all files open from the device and applications that are currently using the drive, go to the “Task Manager” and forcefully terminate all USB-related processes.

In this case, you should first use displaying all user processes, then hiding Microsoft services. After this, the extraction can be repeated.

What should I do if I no longer have access to Safe Retrieval?

Now let's see what to do if it is no longer possible to safely remove the flash drive both from the system tray and from the device properties in the computer or Explorer section.

In the simplest case, you need to open the properties of the drive in any of the above sections or in the corresponding manager and go to the hardware tab. In the window, you need to select your device and click on the properties button located below. Next, click the change properties button and go to the policy tab, where you can see a hyperlink to safe extraction. Click on it, and the flash drive can be removed. At the same time, by the way, the operation of the drive will also speed up.

Alternative technique for restoring safe extraction

There is another way that allows you to restore the original settings so that you can then safely remove the flash drive.

This option is somewhat more complicated, but it provides an almost one hundred percent guarantee of restoring access to the procedure. To do this, use the “Run” console call with administrator rights.

It needs to include the following:

  • (necessarily exactly as specified in the original command given).

After executing the command, a new dialog box will appear in which you must first select the device you are looking for, and then click the “Stop” button at the bottom.

Instead of a total

In principle, these are the main methods that allow you to safely remove any USB device from the corresponding port, as well as eliminate some possible problems associated with the inability to perform such a procedure due to lack of access. In the simplest case, you can simply remove the device from the port and reinsert it. Perhaps the system will see it.

However, such methods are only suitable for standard situations and are the simplest for users. If the drive initially has physical damage or file system failures, you will have to use completely different methods related to restoring the functionality of the drive, the information stored on it, or even re-flashing its microcontroller. But this is a separate topic.