What will you do if prompted by the media is write protected when trying to write data on internal or external storage devices? If you have no idea at the moment, the solutions given in this guide on MiniTool Website will help you out.

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.

There are various reasons why this error might crop up are listed as follows:

  • 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 files you intend to read or edit are set to read-only.
  • 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 on Internal Hard Drives?

Fix 1: Check the Disk for Errors

To tackle the media is write protected, another solution is to perform a full disk scan of the problematic drive. Here are two ways on how to check the status of the disk:

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.


Fix 2: Run SFC Scan

Corrupted system files can also be a potential culprit of the media is write protected. You can run the SFC (System File Checker) scan to check & fix the damaged system files and then use DISM (Deployment Imaging and Servicing Management) commands to repair the corrupted system image. Here’s how to do it:

Step 1. Run Command Prompt as an administrator.

Step 2. Type sfc/ scannow followed by Enter.

run sfc /scannow

Step 3. After the process is complete, reboot your computer and then run CMD with administrative rights again. Run the following commands one by one and don’t hit Enter after each command.

Dism /Online /Cleanup-Image /CheckHealth

Dism /Online /Cleanup-Image /ScanHealth

Dism /Online /Cleanup-Image /RestoreHealth

Related article: fix-dism-online-cleanup-image-restorehealth-stuck

Fix 3: Perform a Full Scan

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 4: Untick the Read-Only Attribute

Some specific files are probably set to read-only, so they can be read but not modified. In this case, it is a good option to disable the read-only attributes from the Properties menu of the file or folder.

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

Step 2. Right-click on the file or folder and select Properties from the drop-down menu.

Step 3. Under the General tab, uncheck Read-only.

untick Read-only


If you select a folder that contains other files or folders, the system will ask you to confirm the attribute change so that this change will also be applied to all the contents inside the primary folder.

Step 4. Click on Apply & OK to apply and save the changes.

How to Fix the USB Drive Read Only Issue on Windows 10/11?
How to Fix the USB Drive Read Only Issue on Windows 10/11?

What is USB drive read only? Why does your device become read only? In this guide, we will show you the causes of it and help you to remove this attribute.

Read More

How to Fix the Media Is Write Protected on External Hard Drives or USB Flash Drives?

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: Run DiskPart

Also, if your external drive or USB flash drive is marked as read-only, you can remove the attribute via DiskPart.

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 corresponding value in Windows registry is incorrect. Therefore, you can remove the write protection by tweaking the value of StorageDevicePolicies.


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:


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: Format the Drive

Corrupted file system can also lead to the media is write protected. If it is the case, you need to format your external hard drive, USB flash drive or removable drive. Here’s how to format the target drive to make it editable:

Step 1. Run MiniTool Partition Wizard and select the partition that needs formatting.

MiniTool Partition Wizard FreeClick to Download100%Clean & Safe

Step 2. Scroll down in the left panel to find Format Partition and click on it.

Step 3. Set the partition label, file system, and cluster size and hit OK.

 set these items

Step 4. Then, you will be allowed to preview the formatted partitions. If you are sure to apply this change, hit Apply.

Suggestion: Back up Your Files with MiniTool ShadowMaker

Although you can remove write protection and make your storage device work properly again with the solutions mentioned above, what if you are in a hurry to edit the files and finish your work? Everything will be easier if you have created a backup of your important files before hand.

If you have a backup copy in hand, you can restore the files easily and quickly rather than spending a long time trying the solutions one by one until the problem is fixed. Among a wide selection of backup tools in the market to choose from, MiniTool ShadowMaker can satisfy your need for file backup.

Apart from backing up files or folders, this free and reliable backup software can also supports making a backup for systems, selected partitions, and even the whole disk on Windows 11/10/8/7. At the same time, full backup, incremental backup, differential backup, and automatic backup are also available in MiniTool ShadowMaker. Let’s see how to back up files in just a few clicks with it:

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

MiniTool ShadowMaker TrialClick to Download100%Clean & Safe

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.


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

[Guide] How to Back up Your Computer to an External Drive
[Guide] How to Back up Your Computer to an External Drive

Do you know how to backup hard drive Windows 10 with ease? This post will show three ways to backup hard drive with the professional hard drive backup software.

Read More

# Further Reading: The Backup Failed, The Media Is Write Protected

The media is write protected also occurs when creating a system image. The complete error message is – The backup failed. The media is write protected. (0x80070013)

If you are facing this problem currently, you can try the two solutions below to deal with it.

Fix 1: Optimize Drives for Better Performance

In 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.


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: Disable OneDrive Files on Demand

If you are using OneDrive to store files, you can try turning off the Files on Demand feature to solve The backup failed. The media is write protected.

Step 1. Launch OneDrive and go to Settings.

Step 2. Under the Settings tab, uncheck Save space and download files as you use them.

disable Files on Demand

Step 3. Click on OK to save the changes.

We Need Your Voice

This guide shows you several solutions on how to fix the media is write protected on the internal hard drive and external hard drive ( or USB flash disk) respectively. No matter which method you choose, make sure to follow the guidelines carefully.

Most importantly, it is always good to create a backup of your files on a regular basis so that the file copy can meet an urgent need when your files become inaccessible or uneditable. Any opinion about our product is welcomed! You can share your idea in the comment zone or send us an email to [email protected].

  • linkedin
  • reddit