How to fix Diskpart failed to clear disk attributes

Brithny updated on Aug 19, 2020 to Partition Master | How-to Articles


When your hard drive, USB pen drive or SD card is read-only, it is set to be write-protected, which will prevent you from making any changes on the device, for example, modify the old files on it or write new data to it. 

As a free partition tool built-in Windows system, Diskpart is usually the users' first choice to remove the Write protection and change the read-only to normal. To do it, just run the command "attributes disk clear read-only".  As you can see, now the "Current Read-only State" and "Read-only" attributes are set to No and the disk is now writeable. To exit Diskpart, just type the word "exit" and then press Enter. 

But the results vary for different users, some people successfully manage the job but others just get the error Dskpart attributes disk clear read-only failed. A similar problem is Current Read-only State yes. Some people find that they can successfully clear the read-only attribute but can not change the “Current Read-only State” attribute from Yes to No.  

How to fix Diskpart failed to clear disk attributes issue

No matter you encountered Diskpart clear read-only not working issue in which situation, here you can find full solutions to solve the problem.

Method 1. Turn off the physical Write protection switch 

When you suffered Diskpart failed to clear disk attributes issue while running Diskpart to clear read-only disk attributes, please first check if there is a physical Write protection switch on the hard drive, USB pen drive or SD card, if yes, turn off it. Then go to check if Diskpart clear read-only can work properly.

Fix Diskpart failed to clear disk attributes issue - turn off the physical Write protection switch

Method 2. Remove Write protection using Regedit.exe

1. Connect the read-only device to PC.

2. Press Windows + R keys simultaneously to open the Run box. Type regedit and click "OK".

3. Now, you've opened the Registry Editor. Find the path there: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies

4. Click the Write Protection icon, and set the Value data to 0. Click "OK".

Fix Diskpart failed to clear disk attributes issue using Regedit.exe

Regedit.exe Alternative - Write-Protection Removal Tool

If you are not professional in computing management and not familiar with command lines, don't worry. EaseUS R&D team has promoted a fresh kit for helping you resolve the write-protection issue on your hard drive, external hard drive, USB or SD card, etc., devices.

EaseUS Tools M is a practical computer fixing tool that is safe and light-weighted. It's a perfect alternative to the command line. 

Use this one-click tool to solve the write-protection issues on your own:

Step 1: DOWNLOAD and install EaseUS Tools M for free.

Step 2: Run EaseUS Tools M on your PC, choose the "Write Protection" mode.

Step 3: Select the device which is now "Write-Protected" and click "Disable" to remove the protection.

Remove Write Protection from storage devices.

Usually, after all these steps, you will find that Diskpart failed to clear disk attributes issue have gone away. If not, it suggests that the storage media may contain corruptions or bad sectors. Just try EaseUS free partition software to check and repair the possible errors. 

Download Now

 Windows 10 is supported

Method 3. Check and repair the disk errors 


Step 1: Open EaseUS Partition Master on your computer. Then locate the disk, right-click the partition you want to check, and choose "Check File System".

Check Partition - Step 1

Step 2: In the Check File System window, keep the "Try to fix errors if found" option selected and click "Start".

Check Partition - Step 2

Step 3: The software will begin checking your partition file system on your disk. When it has completed, click "Finish".

Check Partition - Step 3

After repairing all the possible disk errors, go to Diskpart to clear read-only disk attributes again to check if the issue is fixed.

Was This Page Helpful?


Frequently Asked Questions

Why Choose EaseUS Partition Master?

"I've used Partition Master Professional many times to create, delete, format, move, rename, and resize partitions."PCWorld

"Partitioning tools have come a very long since the days of complicated command line utilities and EASEUS Partition Master is one of the most advanced programs available."TECH ADVISOR

"I love that the changes you make with EaseUS Partition Master Free aren't immediately applied to the disks. It makes it way easier to play out what will happen after you've made all the changes."Lifewire

Will the "Migrate OS" feature transfer the Windows system files only or the whole C drive?

To ensure that the migrated system will boot normally, the Migrate OS feature will transfer all the files in the system and the boot partitions. Generally, the boot partition is the C drive so the transfer will include all the files in C.

Does EaseUS Partition Master license apply to multiple computers?

The license of Partition Master Professional and Server editions can be used on 1 computer only, while that for for the Technician and Unlimited editions can be used on multiple machines.

What is the difference between EaseUS Partition Master Trial version and the Free version?

Free is for home users only, with most basic functions available such as partition resize and clone. While trial can help you understand how this product works and test what a full license can do on a business or server OS machine.

Will it cause any data loss after resizing the partition in EaseUS Partition Master?

Generally, it will not cause any data loss or boot issue by resizing a partition. However, in order to protect your data, we suggest that you backup the partition before resizing, in case of any unexpected situations such as power outages, computer hardware failures, etc. You can use EaseUS Todo Backup to backup the partition and its trial version is fully functioned for 30 days.

What should I prepare before resizing the partition?

On the partition that is going to be operated, there might be some files being occupied by other programs. To ensure a successful operation, we suggest that you close all the unnecessary software before resizing that partition. Otherwise, EaseUS Partition Master will detect the partition being locked by the other software and require a reboot to resize the partition under boot mode.

About EaseUS Partition Master

All-round disk & partition management software for personal and commercial use. Let it manage your storage drive: resize, format, delete, clone, convert, etc.

Video Tutorial

How to Partititon a Hard Drive on Windows 10/8/7