Overview– The write protection is a common issue with the USB flash drive/pen drive, in this article, you will see what are the reason behind disk protection and how can you remove write protection from the USB drive.
USB Flash drive or Pendrives are the easiest way to carry and transfer any type of data like image, documents, music, movies, etc from one computer to another. The higher capacity of flash drives is also used for data storage. Flash drives are very useful in Windows Installation and certain troubleshooting.
However, sometimes you may get an error while transferring data from a computer to USB flash drive that “The disk is write protected, remove the write protection or use another disk”.
Why does Your Flash Drive Get Write Protect?
Some malware or software can affect the registry entries in Windows computers, or the system admin has put some restrictions on the ports or your flash drive may be corrupt.
This error occurs when Write protection to your USB flash drive is enabled and you cannot transfer any data to the flash drive and can’t delete data from flash drive. However, you can copy data from the flash drive to your computer.
Write protection to flash drive is sometimes useful, say, you have some important data then enable write protection and prevent from accidental deletion or format, also it is not easy to delete data for a non-tech person.
So enabling and disabling write protection is a good idea to keep your data secure. Sometimes due to the different types of malware, it automatically becomes Write Protected in such case you can remove write protection using the below technique.
Remove Write Protection From USB Flash Drive Via CMD
Usually, people take Write protection as a problem, since they are unable to copy data to a flash drive so this is a big issue. Many people throw their flash drive assuming that it is useless now. So here are simple steps by which you can disable write protection from a USB drive using the command prompt.
1. Insert your flash drive to the PC.
2. Go to Start and search for cmd right-click on it and “run as administrator“. Or Windows 10, 8.1 user press Start button + X and select Command Prompt (Admin).
3. Once the command prompt is open, type diskpart and hit Enter, it will give you access to manage disk partition.
4. Type list disk and hit Enter. It will show you all connected disks to your computer, like disk 0, disk 1 along with their storage capacity.
5. Recognize your flash drive by its storage capacity like mine is 16 GB ( As per Manufacturer) which is showing here 14 GB (Actual Size) as Disk 1 or remove all other external drives except your Flash Drive, then you will get as above and Disk 1 is going to be your Flash drive.
6. Now type Select Disk # (Select disk <disk no.>)
As in the above case, I need to type Select disk 1 and hit Enter. It will select disk 1 and any further command will apply on disk 1.
7. Now you need to check if your flash drive is Write protected.
Just type attributes disk and hit enter, it will show you the current status of disk protection.

Currently, the disk is write protected
As in the above image, which shows that the disk is write-protected.
8. Now, to disable write protection from flash drive type attributes disk clear readonly and hit enter.
The above command will clear the read-only mode from your flash drive and it won’t be write protected anymore. You can copy and delete data from your flash drive as usual.
Changing Registry Value to Remove Write Protection
You may be unaware that there are some corrupt registry entries into your Windows computer leading to the write protected flash drive. Changing the registry value is a good idea if the cmd method doesn’t work.
Try to connect the USB drive to another PC and check if it is working or not. If it is working on another computer then there is a problem with your first PC.
If not your flash drive is write protected or it is corrupted. (Use the cmd method to fix it)
To fix the corrupt registry value follow these steps-
1. Press Win + R keys together and it will open the “Run” dialog box.
2. Type in “regedit” and hit OK. It will open registry editor
Now navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
3. Make sure to highlight StorageDevicePolicies in order to see the registry values.
4. On the right pane double click on “WriteProtect”
5. In the Value box if it has a value “1” then change it to “0” and hit OK to save the changes.
The value 0 removes the write protection from the registry.
Now, reboot your computer and check if the flash drive is working or not.
What if there is no such registry key?
By any chance, if you don’t see StorageDevicePolicies in the control folder then it is easy to create.
1. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control inside registry editor.
2. In the Control folder right click on the black space in the left pane. Select New -> Key and name this folder “StorageDevicePolicies”.
3. Now highlight the created folder and you would be able to see the registry keys.
4. On the right pane right-click on the blank space and select “New -> DWORD” name the new key as WriteProtect and change the value to “0“.
Reboot your computer in order to make changes effective. Now you would be able to copy data to the flash drive.
How to Format Write Protected USB Flash Drive Using CMD
This is something you wouldn’t want to do if your flash drive has important data in it, but if everything fails and you want to save the flash drive then try to format it.
Just open My Computer or This PC select the flash drive and right-click on it then click on Format. It may take some time to format the drive into NTFS (New file system).
If you can’t format the flash drive using Windows GUI then use the cmd to format it.
1. Follow the steps given in the first method till Step 6 where you can select the flash drive inside diskpart.
2. After selecting the disk type in format fs=fat32 quick and hit Enter. Or you can format it as NTFS by typing format fs=ntfs quick
This will completely format the flash drive, you may recover the lost data using file recovery tools like Recuva or Undelete.
Enable Write Protection to Flash Drive
Let’s say in any case you want to protect your data from deletion or formatting flash drive then you can enable write protection which will help you to secure your data in flash drive.
- To enable write protection, open cmd as admin.
- Type diskpart to enter into disk partition mode.
- Now type list disk and it will show you all the disks.
- Type select disk <disk_no> and hit enter to select the flash drive. (Find flash drive disk number by it’s storage capacity).
- Type attributes disk set readonly and hit enter.
This will set your flash drive in Read Only mode that is write protected.
All the above steps to enable and disable write protection applies on USB flash drive, Micro SD Cards, Camera, and any other removable storage device.
In case if you have a Camera Memory card then first you need to check the lock button on the side of the memory card.
If it is write-protected then flip the lock switch on another side (Up-Down) it will disable write protection from the Camera Memory card, or if you are using a memory card holder for SD Cards.
Also, you can follow the above steps if the lock button does not work or broken.
If you want to buy a USB 3.0 Flash drive for faster read and write operation then here is my recommendation for you, this flash drive and its performance are tested by me. Buy Faster USB 3.0 Flash Drive (Affiliate link) which has transfer speed up to 225 MB/s.
Also Read