How to Avoid Viruses on a Flash Drive in Windows 10

There are many security threats that we can find when browsing the Internet. They can infect us through software that we install, downloads that we make, sites that we visit … Also simply by using a USB memory on an infected computer we can be victims of attacks that compromise our security and privacy. It is a very present problem and that we must take into account. In this article we are going to explain how to avoid viruses on the USB stick with a Windows 10 configuration.

How to avoid viruses on a flash drive in Windows 10

It is common that through this type of memories we exchange information between devices. We may want to transfer documents from a laptop to a desktop computer, we are going to print files to a copy shop, they have left us a flash drive with some data that we want to pass … However, all this can put security at risk.

Avoid Viruses on a Flash Drive in Windows 10

Let’s say a computer is infected with some variety of malware. That malicious software could be configured to infect USB devices that connect to the computer. Basically what they would do is write to the USB memory and when we put it on another computer infect this device.

The objective of this configuration that we are going to explain is that it cannot write on the USB key. In other words, even if we put the memory into an infected computer, it could not write, it could not filter malicious files. A way to protect our flash drive and thus avoid viruses.

Group Policy Editor

We can configure using Group Policy to prevent a computer from writing on a USB memory that we put. For this we have to go to Home , write Group Policy and access the editor . We can also just press the Windows + R key combination and run gpedit.msc.

When we are in the Group Policy editor, go to Computer Configuration, Administrative Templates, System and Removable Storage Access. There we will see a series of options and the one that interests us is the one indicated by Removable disks: deny write access.

Denegar acceso de escritura desde la Directiva de Grupo

Then we have to double-click on that option. We will see that it comes as Not configured. We must therefore click on Enabled, we accept and we leave. To confirm that the changes are made we have to access the Command Prompt. To do this we press the Windows + R key combination and type cmd. Once here you have to run the gpupdate / force command and restart the computer.

Registry editor

We can also make a configuration through the Registry Editor. To do this, press the Windows + R key combination and type regedit . We have to go to the path EquipoHKEY_LOCAL_MACHINESYSTEMCurrentControlSetControl.

When we are here we have to click on Control, with the right mouse button, and click on New and Password. This key must be named StorageDevicePolicies . On the right side we right click with the mouse, click on New, DWORD (32-bit) and give it the name WriteProtect .

Once this is done, double click on WriteProtect to edit its properties and give it the value of 1. We accept and restart the computer for the changes to take effect.

Evitar virus en el pendrive en Windows 10

In short, by following these steps we have mentioned we can avoid writing to our flash drive and thus avoid possible viruses and malware. We have seen how to do it both with the Registry Editor and through the Windows 10 Group Policy. In this way, if we put a USB memory on that computer, there will be no risk of it being infected.

Threats come through very different means, as we have mentioned. Sometimes simply by opening a link that reaches us by email we can compromise our system. It is very important that we have security tools that protect us. A good antivirus can prevent malware from entering. But we must also have the latest versions and patches. Sometimes vulnerabilities arise that can be exploited by intruders. It is necessary that we apply this to all types of systems.