How to Protect Pendrive From Virus

PenDrive is the best portable storage utility to interchange the data between Computers. When we share our PenDrive with someone else, we always afraid of the viruses and malware that could travel from someone else’s computer to ours through PenDrive. Therefore, In this guide, we will show you how to protect Pendrive from Virus and Malware.

How to Protect Pendrive From Virus without any software

How to Protect Pendrive

In this guide, we will change the PenDrive into the read-only mode. By doing this, no one will able to delete the files, modify data, and format the drive. When we set the attribute read-only on the Disk, the Disk gets protected, thereby no data can be written on the Disk.

The following steps will show you how to make PenDrive read-only.

  1. First of all, connect the PenDrive to the Computer.
  2. Go to the Start Menu and search Command Prompt, then open the Command Prompt from the search result.
  3. In the command prompt, type the following command, then hit Enter.
Command: Diskpart
  1. This will open Diskpart command-line utility.
  2. In the Diskpart window, type the following command, then hit Enter.
Command: list disk
  1. It will list all the installed Disks.
  2. Now, select your PenDrive, to do this, type the following command.
Command: select disk (your PenDrive order Number)
How to Protect Pendrive From Virus without any software
  1. Once the Disk is selected, type the following command to set the attributes readonly.
Command: attributes disk set readonly
How to Protect Pendrive From Virus without any software
  1. Once it is successful, remove the PenDrive from the PC and connect again.

Now your PenDrive is read-only, no one incluindg you will not able to make any changes on the PenDrive.

Related article: How To Format SD Card on Windows 10

Clear attribute Read-only

When you need to change the data on the PenDrive, you will have to clear the read-only attribute on the Drive. Without doing this, you can not make any changes on the PenDrive.

  1. Open the Command Prompt and run the following command.
Command: Diskpart
  1. In the Diskpart, type the following command to list all the disks.
Command: list disk
  1. Now type the following command to select the PenDrive.
Command: select disk (your PenDrive order Number)
  1. Once the Disk is selected, run the following command to clear the attribute.
Command - attributes disk clear readonly

The read-only attribute has been cleared on the PenDrive. Now you should able to use your PenDrive as before and make any change on the PenDrive.

I hope this guide gives you a clear understanding of read-only mode and how to make PenDrive read-only to protect from Viruses and Malware.

Leave your reply here

Scroll to Top