How to remove the write protection from a flash drive

Sometimes it is impossible to format a USB flash drive or SD card, transfer or write data to it. The Windows system displays an error message saying, “The drive is write-protected. Remove the protection or use a different drive”. In this article, we will analyze the causes and solutions to this problem.


  1. Mechanical write protection
  2. Checking the flash drive for viruses and other malware
  3. How to unlock a flash drive using the Windows Registry
  4. Removal of protection through group policy
  5. Removal of write protection with the Diskpart utility
  6. Removal of protection by software from third parties
  7. How to remove write protection from a single file
  8. What to do if important data was lost

Mechanical write protection

Manufacturers no longer use hardware write protection on flash drives for quite some time. However, if we are talking about SD cards, this switch is still in use. Sometimes even experienced users forget to check this switch, which is on one side of the device.

Therefore, the first thing to do is check that it is not in the “lock” position and if so — move it to the open position.

A recording error may occur due to a flash drive overflow. Check the free space and file system of the flash drive. For example, on FAT32 it will not be possible to write a file larger than 4 GB.

Checking the flash drive for viruses and other malware

Sometimes a virus that is already in your system can also block writing to a USB memory stick. In addition, maybe it got into it from this flash drive, and to save itself from being erased, it turned on the protection. In this case, it makes sense to check the drive for viruses, both system built-in tools and professional antivirus. You can download, for example, a bootable antivirus kit from Avast or Nod32. You can also create a bootable Windows 10 flash drive, boot from it, install antivirus and check your problematic USB stick.

To start the scan, you need to run your antivirus, and then select which drive to scan.

It is worth noting that in all modern antivirus programs, the interface is approximately similar. Therefore, problems with scanning should not arise.

If the antivirus found the malware, we remove it immediately. After that, the write protection should be removed.

How to unlock a flash drive using the Windows Registry

It often happens that the issue is not with viruses, but a Windows system that blocks files and the problem lies in the registry.

Important: Before making any changes, create a Windows recovery point. If you made a mistake and have a problem with your computer, you can recover the registry and bring your system back to its original state.

To unlock a flash drive with the help of a registry you should:

  1. Right-click on the “Start” button, select “Run”, enter the regedit command and confirm the action by pressing “Enter”
  2. In the registry editor go to HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > StorageDevicePolicies

    Create this option if it is not available in your system.

  3. After creation, go to this section, create there a DWORD 32-bit value (or 64 bit depending on your system) and call it WriteProtect.
  4. In the Value Data text field, write “0” (zero)
  5. Reboot the computer.

    After rebooting, the write protection of the flash drive should be removed.

Read more:  No files open after recovery - what to do?

Removal of protection through group policy

If you can’t disable the registry protection, it might be a matter of Group Policy

In this case, to remove the protection from the flash drive, it is necessary:

  1. Press the “Win+R” key combination, enter the gpedit.msc command and press Enter.

    The Windows Group Local Policy Editor will be displayed.

  2. Go to the following path: Computer Configuration\Administrative Templates\System\Removable Storage Access.

    Find “Removable Storage Access” and make sure that “Removable Disks: Deny execute access”, “Removable Disks: Deny read access” and “Removable Disks: Deny write access” are disabled.

  3. If any of these options are enabled, double-click on it and select “Disabled” to turn it off.
  4. Reboot the computer.

Removal of write protection with the Diskpart utility

If a user is afraid to make changes to Windows registry keys and does not want to waste time manipulating Windows Group Policies, you can use the diskpart utility.

  1. Right-click on “Start” and select “Windows PowerShell (Admin)”
  2. Enter the diskpart command
  3. Perform the following commands one by one:
    • list disk and press Enter. (This command displays a list of drives connected to your PC).
    • select disk 0 (Replace 0 with the write-protected device number) and hit Enter.
    • attributes disk clear readonly and confirm, with Enter. (This command removes protection from the drive)
    • exit (exit from diskpart utility)

    Once these commands have been completed, the drive is ready to use.

Removal of protection by software from third parties

Brand flash drive manufacturers release special programs. Some of them can help you remove write protection when your drive is protected. Besides, many versatile applications are designed to remove protection from your flash drive. Their operation principle is approximately the same, so that we will consider the program EaseUS Tools M as an example.

  1. Download the application and install it on your computer.
  2. Open the application and select “Write Protection”
  3. Choose a write-protected drive and press “Disable”

    All done! You can use the drive.

As already mentioned, branded flash drive manufacturers produce special programs. Some of them can also help you remove write protection when the drive is protected.

Below is a list of the most popular ones:

  • Transcend JetFlash Online Recovery
  • Silicon Power Flash Drive Recovery Software
  • Kingston Format Utility
  • SD Memory Card Formatter
Read more:  CHKDSK cannot open volume for direct access

How to remove write protection from a single file

Sometimes it happens that you have one file that you want to make changes to, but can’t because the file is write-protected. When this happens, it is marked as read-only. To make changes, you must add the ability to modify the file:

Step 1: Right-click on the desired file and select “Properties”

Step 2: Uncheck the “Read Only” attribute and press “OK”

After that, you can make changes to the file you need.

What to do if important data was lost

Often while trying to remove the write protection from a flash drive, users perform manipulations that lead to the drive’s failure. It can be as the drive’s file system damages, as well as accidental formatting or deletion of important files. In addition, there are many causes of problems with the drive, but the most important thing is that whatever the cause, all of these activities lead to the loss of important data.

If you notice missing files or strange behavior of the drive, it is better not to wait for it to fail, but to recover all important information right away to avoid losing it.

In addition, you can use this method of data extraction before you proceed to remove the write protection from the flash drive. Thus, you will protect yourself from losing important files.

However, if the data is still missing, use RS Partition Recovery immediately, since every unnecessary manipulation increases the probability of data loss.

RS Partition Recovery

Download RS Partition Recovery

All-in-one data recovery software

The point is that when deleting data or formatting a drive, the system only removes the so-called “link” to the file, allowing it to be overwritten with other information. The file physically remains on the disk. Therefore, any unnecessary manipulation may overwrite an important file and thus cause irretrievable data loss. Unfortunately, it is no way to foresee when the system will overwrite certain data due to too many factors affecting the data distribution on the disk.

It is the main reason why it is strongly recommended not to waste time and use RS Partition Recovery right away.

It is easy to use, and does not require the resources of your PC. That is, you can use RS Partition Recovery even on an old laptop.

But the most important thing is that it supports ALL modern file systems, so you can recover lost data no matter what operating system Windows, Linux, FreeBSD, or Solaris was using on the flash drive.

Just connect the flash drive to your computer and follow the integrated File Recovery Wizard. Everything happens practically in a few clicks.

Frequently Asked Questions

Den Broosen

About Den Broosen

Author and site editor for RecoverySoftware. In his articles, he shares his experience of data recovery on a PC and the safe storage of information on hard drives and RAID arrays.
Leave a comment