How to Remove Write Protection from USB Drives & SD Cards
If you’re having trouble copying a file to a drive in Windows, can’t delete files or are facing an action camera or dash cam that’s refusing to work with a microSD card, it could be that the storage is write protected.
Some USB drives and SD cards (but not microSD) have physical switches which let you ‘lock’ the drive to stop any files being accidentally overwritten or wiped.
Sometimes these switches get moved to the locked position by accident, so have a look for a switch on your drive / card and make sure it isn’t in the lock position.
You’ll still be able to view files on a locked storage device like this (because it’s basically in read-only mode) but you won’t be able to delete them or add any new files.
If it turns out that this isn’t the problem, there are three ways – below – that might get your drive up and running properly.
Also, if you’re having issues with an SD card, try using a different card reader if you have one available, or insert it into a different device.
There is a chance, though, that your card or drive may be corrupt or physically broken. The only option in this case is to buy a new drive. Here are the microSD cards we recommend and the best USB drives.
And if you’re just trying to get back lost data, read our step-by-step guide on how to recover deleted files for free.
Remove Write Protection With Regedit
In any version of Windows run Regedit.exe.
If you’re not sure how to find it, searching ‘regedit’ in the Start menu will usually show Registry Editor at the top of the list.
It’s a bit like File Explorer, so use the pane on the left to navigate to the following key:
Note: if you can’t find StorageDevicePolicies, see the next step.
Double-click on the WriteProtect value in the right-hand pane. You can now change the Value data from 1 to 0. Then click OK to save the change. Close Regedit and restart your computer. Connect your USB drive again and, with a bit of luck, you should find it is no longer write protected.
You can now continue to use the drive, but it’s worth copying off any files you want to keep and then formatting it by right-clicking on it in the list of drives in File Explorer and choosing Format.
StorageDevicePolicies Is Missing
If you can’t find StorageDevicePolicies, you can create it by right-clicking in the white space in the ‘Control’ folder and choosing New > Key and entering the name StorageDevicePolicies.
Now double-click on the new key (it will show as a folder) and right-click once again in the white space and choose New -> DWORD. Name this WriteProtect and set its value to 0. Click OK, exit Regedit and reboot your computer.
If this method doesn’t work, go to the next step.
Disable Write Protection Using Diskpart
With your USB drive or memory card attached to your computer, launch a command prompt. You can do this by searching for cmd.exe or ‘Command Prompt’ in the Start menu.
Note: you may need to run cmd.exe with administrator privileges if you see an “access is denied” message. To do this, right-click on Command Prompt in the Start menu and choose ‘Run as administrator’ from the menu that appears.
If you have Windows 10, simply right-click on the Start button (bottom left of the screen) and choose Command Prompt (admin).
Now, at the prompt, type the following and press Enter after each command:
- list disk
- select disk x (where x is the number of your non-working drive – use the capacity to work out which one it is)
attributes disk clear readonly
- create partition primary
- format fs=fat32 (you can swap fat32 for ntfs if you only need to use the drive with Windows computers)
Now open File Explorer, navigate to your drive and try to copy a file to it, or delete an existing one. If it doesn’t work, it’s bad news and your stick or memory card is probably broken. But the good news is that storage is cheap, so you can replace a USB flash drive or SD card for little money.
Note: We may earn a commission when you buy through links on our site, at no extra cost to you. This doesn’t affect our editorial independence. Learn more.