- The ERROR_WRITE_PROTECT error code, also known as error 19 (0x13) usually occurs when you try to write data on internal or external storage devices. Follow the complete step by step guide below to fix this problem.
- If you encounter any system errors, you will most likely find a solution in our System Errors hub.
- One of the solutions to the ERROR_WRITE_PROTECT problem is to use the Disk Cleanup tool but you can also try our PC optimization tools.
- If you experienced any other Windows 10 errors we've got you covered. Check out our Windows 10 errors hub.
If you’re getting the ERROR_WRITE_PROTECT error code with The media is write protected description, follow the troubleshooting steps listed in this article to fix it.
The ‘ERROR_WRITE_PROTECT’ error message, also known as error 19 (0x13) usually occurs when users try to write data on internal or external storage devices.
There are various elements triggering this issue, including corrupted files and folders, broken EXE, DLL or SYS files, malware infection, outdated software versions, and more.
In this article, we’re going to show you how to fix the ‘ERROR_WRITE_PROTECT’ error code both on internal drives, as well as on external drives.
Fix The media is write protected error on internal hard drives
1. Run a full system scan
Malware may cause various issues on your computer, including errors. Perform a full system scan in order to detect any malware running on your computer. You can use Windows’ built-in antivirus, Windows Defender, or third-party antivirus solutions.
2. Repair your registry using CCleaner
The simplest way to repair your registry is to use a dedicated tool, such as CCleaner. Don’t forget to first backup your registry in case anything goes wrong.
3. Use Microsoft’s System File Checker to check for system file corruption
1. Go to Start > type cmd > right-click Command Prompt > select Run as Administrator
2. Now type the sfc /scannow command
3. Wait for the scanning process to complete and then restart your computer. All corrupted files will be replaced on reboot.
4. Update your OS
Make sure that you’re running the latest Windows OS updates on your machine. As a quick reminder, Microsoft constantly rolls out Windows updates in order to improve the system’s stability and fix various issues.
Go to Windows Update, check for updates and install the available updates. To access the Windows Update section, you can simply type update in the search box. This method works on all Windows versions.
5. Check your disk for errors
On Windows 10, you can run a disk check using Command Prompt.
Start Command Prompt as administrator and type the chkdsk C: /f command followed by Enter. Replace C with the letter of your hard drive partition.
On Windows 7, go to hard drives > right-click the drive that you want to check > select Properties > Tool. Under the ‘Error checking’ section, click Check.
6. Clean your temporary files and folders
The simplest and quickest manner to delete your temporary files and folders is to use Disk Cleanup. As you use your computer or browse the Internet, your PC accumulates various unnecessary files.
These so-called junk files may affect your computer’s processing speed, causing apps to respond slowly and may also trigger various error codes, including the ERROR_WRITE_PROTECT error code.
Clean your temporary files and then try to write data on the problematic storage device again.
Here’s how to use Disk Cleanup on Windows 10:
1. Go to Start > type Disk Cleanup > launch the tool
2. Select the disk that you want to clean > the tool will them tell you how much space you can free up
3. Select the Clean up system files button.
4. For Windows 7 go to Start, type Disk Cleanup and click on it Disk Cleanup.
- In Disk Cleanup’s description section, select Clean up system files and select the drive that you want to clean up > click OK.
- On the Disk Cleanup tab, select the check boxes for the file types that you want to delete > click OK > select Delete files.
7. Use system recovery options
The System Restore option allows you to restore the previous well-performing system configuration without losing any files, except for a few customizable features and settings.
If System Restore is enabled, follow the instructions listed below:
- Go to Search > type system properties > open System Properties.
- Go to System Protection > click on System Restore.
- Click Next > choose the preferred restore point in the new window.
- Once you’ve select your preferred restore point, click Next > click Finish.
- Your PC will restart and the restoring process will start.
After the procedure has been completed, try to write data on the problematic storage device again to see if the problem still persists.
Windows 10 offers a series of advanced recovery option that allows users to clean install the OS. If you’re a Windows 10 user, you can also use ‘Reset this PC‘ recovery option.
- Go to Settings > Update & Security > click on Recovery under the left pane.
- Click on Get Started under Reset this PC > choose to Keep your files.
- Follow the on-screen instructions to complete the reset.
8. Fix The media is write protected error on external hard drives/ USB flash drives
Solution 1 — Tweak the StorageDevicePolicies key
1. Go to Start > type regedit > hit Enter
2. Go to HKEY_LOCAL_MACHINESYSTEMCurrentcontrolsetControlStorageDevicePolicies
If you can’t find StorageDevicePolicies, here’s how to create it:
- Go to HKEY_LOCAL_MACHINESYSTEMCurrentcontrolsetcontrol > right click Control
- Select New > Key > rename the new key into StorageDevicePolicies
- Right click the StorageDevicePolicies folder > select new DWORD(32-bit) Value/ DWORD(64-bit) depending on your OS
- Rename the dword folder into WriteProtect > double click WriteProtect > change the value data into 0 (zero) > close the registry
4. If the StorageDevicePolicies key is available, select it > you’ll see a WriteProtect DWORD key in the right hand pane.
5. Double click WriteProtect > replace the Value Data 1 with a 0 (zero)
6. Go to My Computer (Windows 7) or This PC (Windows 10) and refresh it a few times. You can also reboot your computer.
Solution 2 — Remove write protect using Command Prompt
1. Go to Start > type cmd > right-click the first result > launch Command Prompt as Admin
2.Type the following commands, hitting Enter after each one:
SELECT VOLUME X — X is the volume number you want to remove the write protect from.
ATTRIBUTES DISK CLEAR READONLY
3. A prompt should appear informing you that the write protect has been removed.
4. Close Command Prompt > test your flash drive.
Solution 3 — Install the HP USB Disk Storage Format Tool
Users also confirmed that the HP USB Disk Storage Format Tool successfully removed write protection off their USB flash drives. This tool was created to format USB drives and computers that run older Windows versions. As a matter of fact, the UI is strikingly similar Windows XP’s format option.
The formatting tool works with newer Windows versions, but the results may vary. If you are going to run the HP USB Disk Storage Format Tool on your Windows 10 PC, you should do it as an Admin in Safe Mode in order to avoid errors. Sometimes, the tool may look like it has frozen. Rest assured, it’s still working in the background, but it needs more to complete the task.
There you go, we hope that the solutions listed above helped you fix ‘The media is write protected‘ error code. If you’ve come across other workarounds to fix this problem, you can help the Windows community by listing the troubleshooting steps in the comments below.
Frequently Asked Questions
When a certain media is write protected in means that you cannot change any files or folders from it. You can only read and copy files from the write protected media but you cannot delete or add any content.
You can try to connect SD card to a different device because sometimes the card may not be compatible with your device. Scan the card with an antivirus because it might be corrupted. You can also try to change the drive letter, use Disk Cleanup or format the SD card. If you don’t know how to do all this, read our complete step by step guide.
Right-click the file or folder and select the Properties option. Then uncheck the Read-only box from the Attributes section on the bottom of the window. If you want to change the read-only attributes from many files at once, please read our complete guide.