“The media is write protected” means Windows cannot write, modify, or delete data on a hard drive, USB flash drive, or SD card. To fix it, check the physical lock switch, remove the read-only attribute, edit the registry, run CHKDSK, or format the drive.

What Causes The Media Is Write Protected Windows 10/11

Some of you might be bothered by the operation did not complete because the media is write protected (ERROR_WRITE_PROTECT) when you attempt to edit, copy, or delete files on a hard drive, USB flash drive, SD card, or other storage devices.

This indicates that your Windows device refuses to work with this drive and you are unable to make any changes on it.

The following are common causes for this error:

  • The file system is corrupted.
  • Your storage device is infected with viruses or malware.
  • The disk is corrupted or damaged.
  • Some system files are faulty, damaged or missing.
  • The registry key is set to enable write protection. 
  • The drive is marked as read-only in Windows.
  • The USB flash drive, SD card, or other external storage devices are pushed into the write protection position.

In this article, we will offer you clear and easy instructions about how to get rid of the media is write protected both on internal drives and external storage devices. Without wasting more time, let’s jump into it.

How to Fix the Media Is Write Protected

Check the following table to identify your case and choose a suitable solution.

SituationRecommended Fix
USB drive or SD card has a physical lock.Check the physical switch
Drive is marked as read-only.Use DiskPart to clear the read-only attribute
The drive has file system errors.Run CHKDSK for file system errors
Write protection persists after basic fixes.Check the StorageDevicePolicies registry setting
The drive is corrupted, and data is backed up.Format the drive

Fix 1: Check the Physical Switch

There is a physical write protection switch on the USB flash drive or SD card. If the switch is pushed into the write protection position, the media will be unable to write or read. To check the physical switch, you need to:

Step 1. Eject the drive from your computer.

Step 2. Find the physical write protection switch on the device. Usually, it is located on the side or bottom of the storage device. If the switch is on, move it to the off position.

Fix 2: Use DiskPart to Clear Write Protection

If your hard drive, USB drive, or SD card is marked as read-only, you can remove the attribute via DiskPart.

Ensure you select the correct disk by checking its size.

Step 1. Launch Command Prompt as an administrator.

Step 2. Type diskpart and hit Enter.

Step 3. Type list disk and press Enter to see a list of disks. You can recognize the external or USB drive according to their size. Note down the disk number of your removable disk.

run list disk

Step 4. Type select disk 1 (replace 1 with the disk number you noted down in the last step) and hit Enter.

Step 5. Type attributes disk clear readonly and hit Enter.

Step 6. After receiving Disk attributes cleared successfully, type exit and hit Enter.

How to Fix Diskpart Clean Not Working on Windows 10/11?
How to Fix Diskpart Clean Not Working on Windows 10/11?

What is DiskPart Clean? What if it stops working? Don’t panic! In this post, we will show you how to make it work properly again.

Read More

Fix 3: Modify the StorageDevicePolicies Key

You will get the media is write protected when the WriteProtect registry key is disabled.

Try tweaking the StorageDevicePolicies setting. If this key doesn’t exist, you need to create it first.

Warning:

In case something goes wrong with the registry, please back up the registry database in advance. See this guide - How to Backup and Restore Registry in Windows 10.

Step 1. Press Win + R to evoke the Run dialog.

Step 2. Type regedit and tap on Enter to open Registry Editor.

Step 3. Navigate to the following path:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control

Step 4. Right-click on Control > select New > hit Key > rename the new key as StorageDevicePolicies.

create a new key

Step 5. Right-click on the StorageDevicePolicies folder > select New > hit DWORD (32-bit) Value > rename it as WriteProtect.

Step 6. Right-click on WriteProtect > select Modify > change the value data to 0.

Step 7. Quit Registry Editor and reboot the computer to make the changes effective.

Fix 4: Check the Disk for Errors

The media may be write-protected due to file system errors. To resolve this issue, run Windows disk-checking tools.

Way 1: Run a Disk Scan in Windows Properties

Step 1. Press Win + E to open File Explorer.

Step 2. Right-click on the drive you want to scan and select Properties.

Step 3. Under the Tools section, click on Check > Scan and Repair Drive. Then, the scan will detect and repair any problem on the drive.

 hit Check

Way 2: Run CHKDSK Scan in Command Prompt

Step 1. Type cmd in the search bar to locate Command Prompt and right-click on it to choose Run as administrator.

Step 2. Type chkdsk C: /f and tap on Enter. Remember to replace C: with the letter of your target partition.

run CHKDSK

Fix 5: Run DISM & SFC

Corrupted system files can also be a potential culprit of the media is write protected. You can use DISM to repair the corrupted system image and run SFC to check & fix the damaged system files. Here’s how to do it:

Step 1. Run Command Prompt as an administrator.

Step 2. Run SFC to check & fix the damaged system files and then

Step 3. Type sfc/ scannow followed by Enter.

run sfc /scannow

Fix 6: Scan for Malware

Maybe your device is infected by malware or viruses, causing issues like the media is write protected. In this case, you can perform a full scan to detect any malware running on your computer.

Step 1. Press Win + I to launch Windows Settings.

Step 2. In the settings menu, scroll down to find Update & Security and press it.

Step 3. In Windows Security, go to Virus & threat protection > Scan options.

Step 4. Windows Defender offers you 4 types of scans: Quick scan, Full scan, Custom scan, and Microsoft Defender Offline Scan. Here, we check Full scan and then hit Scan now to start scanning.

tick Full scan

Fix 7: Format the Drive

If the previous methods fail and the drive is still write-protected, formatting may resolve the problem.

Drive formatting erases the files stored on the selected drive. Back up important data before proceeding to avoid data loss. For file backup, MiniTool ShadowMaker can help. Designed for Windows, this backup software allows you to back up disks, partitions, systems, folders, and files.

MiniTool ShadowMaker TrialClick to Download100%Clean & Safe

Step 1. Run MiniTool ShadowMaker and move to the Backup page.

Step 2. Go to SOURCE > Folders and Files, and then you can choose the files you want to back up (checking several files or folders at one time is permitted).

As for selecting a storage path for the backup image files, go to DESTINATION (an external hard drive or USB flash disk is preferred).

select a destination path

Step 3. Click on Back Up Now to start the backup right now.

Tips:

It is highly recommended to develop a habit of backing up regularly. If you desire to do that, you can click on Options > Schedule Settings > turn it on manually to customize to back up your files automatically at a specific time point of a day, week, or month.

create an automatic backup

After the backup, follow these steps to format your drive.

Step 1. Right-click on the target drive in File Explorer and choose Format.

Step 2. Click Start to begin formatting.

If you encounter The backup failed. The media is write protected. (0x80070013) while creating a system image, try the following fixes.

Fix 1: Optimize Drives for Better Performance

Starting with Windows 10 version 1809, Quick Removal is the default removal policy for external storage devices. To address The backup failed. The media is write protected, you can switch to the Better Performance option.

Step 1. Open File Explorer and right-click on your USB flash drive or external hard drive to select Properties.

Step 2. Under the Hardware tab, select your target drive and click on Properties.

hit Properties

Step 3. In General, press Change settings.

Step 4. Go to the Policies tab, tick Better performance or Optimize for performance and then hit OK.

Warning:

Before unplugging the external storage device, you need to use the Safely Remove Hardware option, or else it may lead to data loss.

tick Better performance

Fix 2: Clear Read-Only Attributes via DiskPart

To remove the write-protected error, you can also run DiskPart to clear read-only attributes.

Refer to the steps above for details.

Conclusion

When Windows 11/10 reports “the media is write protected,” start with the simplest ways such as checking the physical lock switch and clearing read-only attributes. If the issue still occurs, check for disk errors or Windows registry settings, or format the drive.

Before formatting, ensure you back up important files to prevent data loss. If you encounter issues with our software, contact us at [email protected].

The Media Is Write Protected FAQ

Can a failing USB drive become write protected?
Yes, a failing USB drive may become write-protected. This behavior acts as a built-in safety measure to protect your data.
Can I recover files from a write-protected drive?
Yes, you can recover files from a write-protected drive. Write protection only prevents data from being added or modified, but still allows existing files to be read and copied.
Why does my drive become write protected again after I remove it?
Your drive may become write-protected again after reconnecting if its flash memory has failed or its controller has enabled a permanent read-only mode to protect your data.
Does write protection mean a drive is damaged?
Not always. Write protection may be caused by software settings or a physical switch, but it can also indicate permanent hardware failure.
  • linkedin
  • reddit