The media is write protected error and how to fix it

by Madalina Dinita
Madalina Dinita
Madalina Dinita
Windows & Software Expert
Madalina has been a Windows fan ever since she got her hands on her first Windows XP computer. She is interested in all things technology, especially emerging technologies... read more
Affiliate Disclosure
  • 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.
The media is write protected error and how to fix it

To fix various PC problems, we recommend Restoro PC Repair Tool:
This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues and remove viruses now in 3 easy steps:

  1. Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues affecting your computer's security and performance
  • Restoro has been downloaded by 0 readers this month.

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.

This error prevents users from actually writing any files to their PC hard drive, external drive, USB flash drive, etc.

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.

If you haven’t installed any registry cleaner on your computer, check out our article on the best registry cleaners to use on PC.


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.

Expert Tip: Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken. We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.

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.

  1. In Disk Cleanup’s description section, select Clean up system files and select the drive that you want to clean up > click OK.
  2. 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:

  1. Go to Search > type system properties > open System Properties.
  2. Go to System Protection > click on System Restore.
  3. Click Next > choose the preferred restore point in the new window.
  4. Once you’ve select your preferred restore point, click Next > click Finish.
  5. 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.

  1. Go to Settings > Update & Security > click on Recovery under the left pane.
  2. Click on Get Started under Reset this PC > choose to Keep your files.
  3. 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.

7. Eject your flash drive > plug it back in and format it using exfat instead of fat32. After this action, ‘The Media is write protected’ message should be history.

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.

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.

idee restoro Still having issues? Fix them with this tool:
  1. Download this PC Repair Tool rated Great on (download starts on this page).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues with Patented Technologies (Exclusive Discount for our readers).

Restoro has been downloaded by 0 readers this month.

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.

This article covers:Topics: