Menu
Is free
registration
home  /  Programs/ Removing flash drives from the windows registry 7. How to remove old USB device drivers from Windows? Non-Self-Configuring Device Drivers

Removing flash drives from the windows 7 registry. How to remove old USB device drivers from Windows? Non-Self-Configuring Device Drivers

Almost every user connects a phone, tablet, reader, flash drives and external HDDs to a computer. When working with these devices, Windows OS installs their drivers. At the end of operation, they are not deleted from the computer (that is, they gradually accumulate) and, like temporary files, unnecessary entries in the registry clutter up the system.

In addition to this, if the devices are disconnected from the USB port incorrectly (pulled out without software shutdown by the "Eject" function), then the installed drivers not only remain in the system, but also continue to function. Because of this, they often cause a software conflict in the process of connecting another USB device (the system "does not see" the device, gives errors, hangs).

This article will help you avoid all these troubles: it will tell you how to remove the driver of an unused USB drive or gadget from the operating system completely, how to automatically uninstall all USB drivers.

Removal by standard means

Surface cleaning

1. Open the Start menu.

2. Click the right mouse button in the appeared panel "Computer". Select Properties from the command list.

3. In the left column, click "Device Manager".

4. In the manager window, in the horizontal menu, open the "View" section and click "Show hidden devices".

5. Open the "USB Controllers" directory.

6. Remove the old or unused driver: right-click on its name → click "Remove".

Deep cleaning

1. Hold down the Win key and press the Pause / Break key. Or open: Start → right-click "Computer" → Properties.

2. In the window that opens, in the left pane, click "Advanced system settings".

3. On the Advanced tab, click the Environment Variables button.

4. In the upper block, click Create.

5. In the "New user variable" window:

  • in the "Variable name" line enter - devmgr_show_nonpresent_devices;
  • in "Variable value" - 1.

6. Click OK in the Variables Panel and in the Environment Variables window.

7. Return to the system properties window (Win + Break) and click "Device Manager".

8. In the manager open: View → Show Hidden ...

9. Click the "Update configuration ..." button (the last one in the panel).

10. The icons of unused drivers in the manager are grayed out (that is, you can uninstall this driver). Open the following directories one by one and remove unnecessary elements (right-click on the name → Delete):

Non-Self-Configuring Device Drivers

Advice! In this directory, you can also remove old drivers installed by programs that have already been uninstalled from Windows (for example, the Comodo firewall package).

This section of devices displays the installed drivers for flash drives, readers, hard drives. Transparent object icons indicate that they are not used (not connected). This means that you can safely get rid of them.

11. After cleaning is complete, restart your PC.

Automatic removal by USBDeview utility

1. Copy this link into the address bar of your browser - http://www.nirsoft.net/utils/usb_devices_view.html#DownloadLinks (the official site of the utility). And then press "ENTER".

2. On the opened page:

  • if you have a 32-bit system, click the first link “Download USBDeview”;
  • if 64-x, the second is "... for x64 systems".

3. Unpack the downloaded archive: right-click on it → select "Extract all ..." → in the "Unpack ..." window, click "Extract".

4. Open the unzipped folder. Run the USBDeview executable file with administrator rights.

5. The utility window displays a list of all drivers installed in the system. Disabled elements are marked with red "chips".

To remove a driver from Windows, select it with a mouse click, and then click the "Trash" icon in the USBDeview panel. Or right-click on it and select “Uninstall Selected Devices” from the context menu.

Note. In addition to the uninstall function, USBDeview provides the user with the ability to disable / enable the driver, view its properties.

Removing all USB device drivers

A global driver cleaning can be performed using the DriveCleanup utility (download link - http://uwe-sieber.de/files/drivecleanup.zip).

1. Unpack the archive downloaded to your computer.

2. If you have 32-bit Windows, open the "Win32" folder, if 64-bit, respectively, "x64".

3. Run the "DriveCleanup" file as administrator.

Once launched, the utility will automatically clean up. At the end of the procedure (when the message “Press any key” appears in the console window) press any key.

Success in setting up the system!

Lists of open files and USB devices, browser history, DNS cache - all this helps to find out what the user was doing. We have compiled step-by-step instructions on how to remove traces of your activities in different versions of Windows, Office and popular browsers. At the end of the article, you will find several scripts to help you automatically keep your machine clean.

1. Clearing lists of recent places and programs

Let's start by cleaning up the list of recent places and programs. The list of recent (in Windows 10 - frequently used) programs is in the main menu, and the list of recent places is in Explorer.


How to turn off this mess? In Windows 7 - right-click on the "Start" button, select "Properties" and in the window that appears, uncheck both checkboxes in the "Privacy" section.

To clear the list of recent locations and documents, you need to delete the contents of the% appdata% \ Microsoft \ Windows \ Recent directory. To do this, open a command prompt and run two commands:

Cd% appdata% \ Microsoft \ Windows \ Recent echo y | del *. *

It also doesn't hurt to delete the contents of the% appdata% \ microsoft \ windows \ recent \ automaticdestinations \ directory. It contains the latest files that appear in the jump list:

Cd% appdata% \ microsoft \ windows \ recent \ automaticdestinations \ echo y | del *. *

To automatically clear recent files on exit, you must enable the "Clear recently opened documents log on exit" policy, which is located under User Configuration \ Administrative Templates \ Start Menu and Taskbar.

Now let's move on to Windows 10. You can turn off the list of recently added and frequently used applications through the "Options" window. Open it and go to the "Personalization" section, the "Start" item. Disconnect everything that is there.


It seems that the problem has been solved, but alas, this is not entirely true. If you enable these parameters again, then all lists with the same composition will appear again. Therefore, you will have to disable this feature through Group Policy. Open gpedit.msc and go to User Configuration \ Administrative Templates \ Start Menu and Taskbar. Include the following policies:

  • "Clearing the list of recently used programs for new users";
  • "Clear the log of recently opened documents on exit";
  • "Clear tile notification log on exit";
  • Delete the list of programs pinned to the Start menu.

Clearing recent places in Windows 10 is easier than in the "seven". Open Explorer, go to the "View" tab and click the "Options" button. In the window that appears, turn off the options "Show recently used files on the Quick Access Toolbar" and "Show frequently used folders on the Quick Access Toolbar." Don't forget to press the "Clear" button.

As you can see, a simple task like clearing the last objects has a rather tricky solution. Without editing group policies - nowhere.

2. Clearing the list of USB drives

In some secure facilities, only flash drives registered in the journal are allowed to be connected to the computer. Moreover, as usual, the magazine is the most ordinary one - paper. That is, the computer itself does not restrict the connection of unregistered drives in any way. Does not limit, but records! And if, during the check, they find that the user has connected unregistered drives, he will have problems.

We are by no means advising you to try to steal military secrets, but the ability to clear the list of recently connected drives can be useful in other life situations as well. To do this, look at the following registry keys:

HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Enum \ USBSTOR \ HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Enum \ USB \

Here they are - all the drives that you connected to your computer.


It would seem that you just need to take and clean everything. But it was not there! First, the permissions for these registry branches are set in such a way that you will not delete anything even in the "seven", let alone the "ten".


Secondly, it takes a long time to assign rights and permissions manually, especially if there are a lot of drives. Thirdly, admin rights will not help. The screenshot above was created when I was performing the delete operation with admin rights. Fourth, in addition to these two sections, there is a long list of sections to clean up. Moreover, they need not only be deleted, but correctly edited.

If for some reason you need to do everything manually, then search for the keywords MountPoints, MountedDevices DeviceClasses and RemovableMedia. But it's much easier to use a ready-made program that will do everything for you. Some forums recommend USBDeview for this. However, I tested it and declare that it does not clear information from all the necessary sections. USBSTOR and USB continue to contain information about the connected media.

I can recommend the program. Run it, check the "Perform real cleaning" checkbox. You can enable the "Save .reg undo file" parameter or not, but if the goal is not to check the program, but to prepare for the upcoming computer inspection, then it is better to turn it off.


The program not only cleans the registry, but also displays a detailed log of its actions (see below). When it finishes working, there will be no mention of connecting drives to your computer.


3. Clearing cache and browser history

The third point in our tudu is clearing the cache and browser history. There are no difficulties here - each browser allows you to reset the list of recently visited sites.

Continuation is available only to participants

Option 1. Join the "site" community to read all the materials on the site

Membership in the community during the specified period will open you access to ALL Hacker materials, increase your personal cumulative discount and allow you to accumulate a professional Xakep Score!

Good afternoon, dear readers of the blog site, today I want to tell you how to delete data on USB flash drives in the Windows registry. This article is a continuation of the article. All information about any USB drives ever connected to a computer is stored in the system registry. If many flash drives of different models and manufacturers are connected to the computer, then over time a lot of garbage accumulates in the registry. As a result, the process of identifying and connecting a new device begins to take a significant amount of time and slows down the system.

There is only one way out. You need to periodically clean the registry keys that store data about plug-in flash drives and other USB drives. Clearing these sections will speed up the connection of new USB devices and the system as a whole.

Cleaning must be done using the Regedit system program. It starts like this.
Start - Run - Regedit

Registry sections that store data about any USB drive ever connected to a PC - Flash drives, external hard drives, as well as cameras, phones, flash players and other devices that, when connected to a PC, were recognized as an external USB drive. All subsections with the Disc prefix can be deleted here.

HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Enum \ USBSTOR
HKEY_LOCAL_MACHINE \ SYSTEM \ ControlSet001 \ Enum \ USBSTOR
HKEY_LOCAL_MACHINE \ SYSTEM \ ControlSet002 \ Enum \ USBSTOR

The screenshots show that the hubs and HDDs were also connected via the hub

If you don't want to clean it by hand, then there is free software, for example USB Oblivion. Run the utility

Check the box Perform real cleaning

We see that everything is complete and many entries have been deleted from the registry. Let's check the registry. Please note that there is no USBSTOR folder.

Well, let's look at the sequence with the USBDeview program, everything is also clean.

Here are dear readers where the data about your flash drives is stored, so if something needs to be deleted then start.

Sometimes it becomes necessary to disable USB ports on a computer or laptop in order to restrict access to connect flash drives, hard drives and other USB devices. Disabling USB ports will help prevent any storage devices from being connected that could be used to steal important information or cause a virus to infect your computer and spread malicious software over your local network.

Restricting access to USB ports

Consider 7 ways with which you can block USB ports:

  1. Disable USB through BIOS settings
  2. Changing registry settings for USB devices
  3. Disable USB ports in device manager
  4. Uninstalling USB Controller Drivers
  5. Using Microsoft Fix It 50061
  6. Using additional programs
  7. Disable USB ports physically

1. Disable 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 with the key F10.
  4. Restart your computer and make sure the USB ports are disabled.

2. Enabling and Disabling USB Drives Using Registry Editor

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

The instructions below allow you to close access for 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. Proceed to the next section

    HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ USBSTOR

  3. In the right part of the window, find the item " Start”And double click on it to edit. Enter value " 4 »To block access to USB drives. Accordingly, if you enter again the value " 3 ”, Access will be re-opened.

Click OK, close Registry Editor and restart your computer.

The above method works only when the USB controller driver is installed. If for security reasons the driver has not been installed, the Start option may be automatically reset to 3 when the user plugs in the USB storage device and Windows installs the driver.

3. Disable USB ports in device manager

  1. Right-click on the " A 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 Disable from the menu.

This method does not 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 item 3 (USB Mass Storage) worked, but it only gives you the option to disconnect a single instance of the USB stick.

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 a user connects a USB drive, Windows will check for the presence of drivers and, if they are absent, will offer to install the driver. This in turn will open up access to the USB device.

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

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 provided above.

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

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

There are many programs for setting the prohibition of 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. Also, USB Drive Disabler allows you to configure alerts and access levels.

7. Disconnecting USB from the motherboard

While physically disconnecting the USB ports on your motherboard is nearly impossible, you can disable the ports on the front or top of your computer case by disconnecting the cable that goes to the motherboard. This method will not completely close 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

Deny 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. Continue to the next branch " Computer Configuration -> Administrative Templates -> System -> Access to Removable Storage Devices»
  3. On the right side of the screen, find the item "Removable drives: Deny reading".
  4. Activate this option (position "Enable").

This section of local group policy allows you to configure read, write and execute access for different classes of removable media.

Good evening, dear visitors to my blog !!! I haven't written anything new for a long time. I sat and thought, but I remembered an interesting topic that I encountered at the session. The topic of the registry and connecting usb-flash drives, in the classroom, we considered writing code to extract a USB flash drive from the system in safe mode using Free Pascal. The code was properly disassembled and considered within the framework of this topic, I do not see the point, but I will tell you how to clean the traces left by the flash drives that you once connected.

How to clean the registry from USB traces?

We will carry out the cleaning using the standard "Regedit" tool. It starts like this: "Start - Run - regedit"

The main window of the Registry Editor will open. Now you will need to find the following subsections:

  1. HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Enum \ USBSTOR
  2. HKEY_LOCAL_MACHINE \ SYSTEM \ ControlSet001 \ Enum \ USBSTOR
  3. HKEY_LOCAL_MACHINE \ SYSTEM \ ControlSet002 \ Enum \ USBSTOR

Each of these sections stores data about the connected flash drives. Records with the prefix Disc, you can safely delete. For example, I give screenshots with the contents of these sections in my registry.

This content is section number 1 - CurrentControlSet

Here you can see the contents of the section - ControlSet001

Well, here, as you probably already guessed, the section entries are ControlSet002

Select and delete records with the Disc prefix.

Why clean registry entries?

If you connect a lot of flash drives to your computer, then your registry starts to clog up with this garbage, as a result of which the recognition process starts to slow down with each new flash drive, but do we need it?

Is it possible to facilitate (speed up) the cleaning procedure?

Yes, it is possible! To do this, you need to use a program, as an example I can give - Usb Oblivion. The program is easy to find on the Internet, it is free, and weighs very little.

Run the program as administrator, put a check mark on "Perform real cleaning" and press the "Cleanup" button - it's done.