The use of USB flash drives has skyrocketed for a long time. We use them mainly to carry our files or programs from one place to another with total comfort. Its small size and ever-increasing capacities at a reduced price mean that we connect a USB flash drive to our computer every day. However, the fact of being able to take them from one place to another and plug them into all kinds of computers means that, in the end, they are one of the most dangerous devices for the computer, since we can easily become infected.
In the event that we need to have the possibility of deactivating the use of USB memories on our computer, we will tell you about the different ways that we have to be able to do it from Windows. For this we can use the Device Manager, the Group Policy Editor, the Registry Editor or third-party programs.

Why prevent connecting a flash drive to the PC?
There are times when we may want to restrict access to pen drives to prevent them from damaging our equipment. For example, you might want to disable access to prevent any user from connecting strange devices, which may contain malware that can harm your PC or make it difficult to install apps from unknown sources.
Or if the device stores sensitive data, disabling read and write access to these removable storage devices can help us lock down the system to prevent other users from trying to make a copy of certain information, improving security even if the data is stored. In the net.
The truth is that, regardless of the reason, in both Windows 10 and Windows 11 we can carry out configurations that will allow us to deactivate access to all storage devices .
Ways to prevent its use
Next, we are going to see different ways that we have to be able to deactivate a USB memory on our Windows 10 or Windows 11 computer.
Unmount a USB drive to prevent its use
When we talk about dismounting a unit, it means the same as if we extract it. In this way, even if it is connected to our PC, we will not be able to use it since the system will take care of ignoring its access, not recognizing it. To be able to unmount a unit we open Windows Explorer by pressing the keyboard shortcut “Windows + E”. Then click on This computer.
Next, we click on the drive that we want to unmount that is in the “Devices and drives” section. This drive can be a hard drive, USB stick, or SD card.

Finally, we click on it with the right mouse button and in the context menu we click on “Eject” . Once this is done, the drive icon disappears from the File Explorer window, although the device remains connected and a notification will appear indicating that we can now disconnect the drive.
Block USB from Device Manager
The simplest process to be able to disable the use of a USB memory is to do it from the Device Manager. In this way they will not work and nobody will be able to use USB memories on the computer with the risk of being able to infect us.

To do this, simply launch the Windows + X keyboard shortcut and from the menu select the Device Manager option and once there, we display the Universal Serial Bus or USB Controllers and click on each USB port with the right button of the mouse. mouse to disable each of them. That way, when someone inserts a USB, Windows won’t be able to find the drivers.
Using the Local Group Policy Editor
If we are Windows 10 Pro or Enterprise users, the easiest way to prevent users from accessing our removable storage is by using the Local Group Policy Editor.
To do this we are going to press the keyboard shortcut Windows + R and we will open the Run command. Then we write gpedit.msc and click OK or press Enter. Once in the editor we navigate to the following route:
Configuración del equipo / Plantillas administrativas / Sistema / Acceso de almacenamiento extraíble
Now on the right hand side, we double click on All Removable Storage Classes: Deny access to all .

In the new window we select the Enabled option and click on Apply and OK to save the changes. Now we only have to restart the computer.

Once we complete the steps, Windows will deny access to all removable storage classes, including USB Flash drives, USB external hard drives, physical disks (such as CDs and DVDs), and other types of storage that belong to the removable storage class. removable.
In case we want to revert the changes, it will only be necessary to perform the same steps again and click on the Not configured option.
From Registry Editor
Another possibility is to make a small change within the Windows Registry Editor to be able to disable the use of a USB stick. To do this, the first thing will be to press the keyboard shortcut Windows + R, type regedit and press Enter or the OK button.
Once in the Registry we must navigate to the following address:
HKEY_LOCAL_MACHINE / SYSTEM / CurrentControlSet / Services / USBSTOR

Here in the right panel we find a value named Star . We double click on it and change its value to 4 , which is the one that deactivates the use of USB memories that we connect in Windows 10 and Windows 11. In the event that we want to activate them again, then we will have to change its value to 3.
Disable from BIOS/UEFI
Some manufacturers offer the possibility of being able to disable the USB ports of the computer from the BIOS or UEFI . First of all, we can review the user manual of our board model and find out if it has this option to enter and deactivate them.
This method can be the most complicated for many users, since making changes to the BIOS/UEFI of our computer can be detrimental to our PC, so it is only recommended that it be carried out by the most advanced users.
With third-party apps
If we prefer not to have to modify anything in the registry, in the BIOS, or have to touch anything in the USB port configuration, then we can use some third-party applications with which we can easily disable USB drives .
Nomesoft USB Guard
It is a lightweight application for Windows specially created to help us block USB devices. The tool is useful for users who want to protect their PC from being infected with various types of threats that can be easily spread via USB Flash drives. Tools like Nomesoft USB Guard are quite useful to help us keep our system safe from potentially dangerous threats. It has been developed in a simple way, so that we can perform the operations in just a few clicks. To use it, simply download its latest version for free and run it.

USB Drive Disabler
We are talking about a lightweight application that can help us disable access to all USB ports on our PC. It is easy to use since it does not require any configuration parameters. It should also be said that it is a portable software, so it does not require installation or make changes to the Windows Registry and the remaining files are not saved on the hard drive once we delete it. Its interface is based on a single window from which you can immediately disable all USB ports with a simple click. The restoration can also be done in a simple way, from the Enable USB drives option. Free download usb drive disabler .
