The media is write protected
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 media is write protected: Error background
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
Solution 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.
Solution 2 — Repair your registry
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.
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.
Solution 3 — 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.
Solution 4 — 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.
Solution 5 — 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 “Clean up system files”.
Here’s how to use Disk Cleanup on Windows 7:
- Go to Start > type Disk Cleanup > open 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.
Solution 6 — 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.
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.
RELATED STORIES YOU NEED TO CHECK OUT:
- ‘Write to disk: Access Denied’ error with uTorrent [Fix]
- How to: Overwrite existing files during download
From billing and data management to keeping track of inventory, finance and business tasks, Microsoft Excel is one handy program. The fact that Excel application is […]
A recent security update by Microsoft addressed an Internet Explorer‘s vulnerability that was initially discovered by Google’s Threat Analysis Group. Microsoft described the vulnerability as “An information […]