Last updated on June 14th, 2016
The "Windows was unable to complete the format" or the "Disk is Write Protected" error messages, may appear when you try to format an SD Card or a storage device (HDD, USB disk), by using the Windows Format tool. If one of the above format error messages is displayed on your screen, means that the formatting process is not completed properly on your storage device and you cannot use your storage device at all.
The "Unable to complete the format" &"Disk is write protected" error/problems, while trying to format a local disk or an external/removable drive (e.g. an SD media card or a USB flash disk or a USB external drive, etc.) means one of the following:
1. The disk is write protected (Read-only) and you haven't permission to change/delete/modify the files on the disk or even to format the drive.
2. The file system type on the disk is in RAW format and it is not recognized by Windows.
3. The file system on the drive (disk) is corrupted – unreadable.
4. The drive has a physical damage.
In this tutorial you can find detailed instructions on how to resolve the "Windows was unable to complete the format" problem when you try to format a storage device.
How to fix: Windows Cannot Format HDD, USB disk or Memory Card (SD/SDHC/SDXC).
Step 1. Remove the USB/SD Write Protection using the UNLOCK switch.
– Some USB flash drives and media (memory) cards (SD/SDHC/SDXC) have a hardware Write Protection switch on their surface. So first of all, check if your device has this security switch and if it does, put this switch to UNLOCK (OFF) position to remove the write protection.
(e.g. If your card is a mini SD card, then insert your card into the SD adapter and change the position of the write-protection switch to OFF position).
Step 2. Disable the USB/SD Write protection in Registry.
Remove the write protection using registry.
1. Open Registry editor. To do that:
2. Type regedit and press Enter to open Registry Editor.
IMPORTANT: Before you continue, first take a backup of your registry. To do that:
- From the main menu, go to File & select Export.
- Specify a destination location (e.g. your Desktop), give a filename to the exported registry file (e.g. "RegistryUntouched"), select at Export range: All and press Save.
2. Navigate (from the left pane) to this key: *
* Note: If you don't have the 'StorageDevicePolicies' folder, then right-click at the 'Control' folder and select New > Key. Name it StorageDevicePolicies
3. At the right pane double click to open the WriteProtect key. *
* Note: If you don't have the 'WriteProtect' key, then right-click on an empty space (at the right pane) and select New > DWORD (32-bit) value. Name it WriteProtect
4. Type 0 at value data box to disable the storage write protection. *
* Note: If you want to enable the write protection in the future, put this value to 1.
5. Close Registry Editor.
6. Restart your computer.
7. Open Windows Explorer, right-click on your USB drive and select Format. If the format still fails, then continue to the next step.
Step 3. Repair corrupted/damaged or RAW file system with the DISKPART tool.
By using the below procedure in DISKPART utility you 'll be able to fix file system problems and to eliminate the "disk write protected" error message when you are trying to format the USB/Memory drive.
1. Before you continue, unplug all other working removable drives (USB disks, Memory cards, etc.) from your computer.
2. Open an elevated command prompt window by going to:
In Windows 7 & Vista:
- Start > All Programs > Accessories
- Right-click to "Command prompt" item and choose "Run as administrator".
In Windows 10, 8 & 8.1:
- Right-click at the screen's bottom-left corner and from the pop-up menu, choose "Command Prompt (Admin)".
3. Then launch the DISKPART tool and give the following commands in order (press Enter after typing each of them) to resolve the write-protected error and to fix the corrupted file-system on your problematic HDD, USB disk or Memory card.
Note: If you receive the following error after executing the "diskpart" command, then probably your disk is damaged and you have to replace the disk.
" DiskPart has encountered an error: The request could not be performed because of
an I/O device error. See the System Event Log for more information."
4. At DISKPART command type:
- list disk
5. From the listed disks, find out which disk is the problematic disk. You can easily find out which is the problematic disk in the list from its size in GB (Gigabytes).
6. Then select the problematic disk by typing: *
- select disk <DiskNumber>
* Note: Replace the "<DiskNumber>" with the number assigned to the problematic drive.
e.g. At this example, the problematic disk is listed as "Disk 1" (see screenshot below). So the command in this case is: select disk 1.
7. Type the following command to clear (remove) the Read-Only attributes (write protection) on the selected disk:
- attributes disk clear readonly
8. Then remove the partition on the selected disk by typing:
9. Then create a partition on the selected disk by typing this command: *
- create partition primary
* Note: If after executing the above command you receive the following error message, then try the following methods to resolve it :
" No usable free extent could be found. It may be that there is insufficient free space to create a partition at the specified size and offset. Specify different size and offset values or don't specify either to create the maximum sized partition. It may be that the disk is partitioned using the MBR disk partitioning format and the disk contains either 4 primary partitions, (no more partitions may be created), or 3 primary partitions and one extended partition, (only logical drives may be created)".
1. Type these commands in order:
1. select partition 1
2. Continue to format the drive (10).
1. Clean all partitions (it takes a long time) on the disk by typing this command: clean all
2. After DISKPART cleaning, create a partition on the disk by typing: create partition primary
3. Continue to format the drive (10).
1. Reboot your computer in Safe Mode.
2. Log in to Windows with an Administrator account.
3. Open Windows Explorer, right-click on your USB drive and select Format.
10. Finally format the disk in FAT32 file system by giving this command.*
- format fs=fat32
1. If you want to use the disk in a Windows computer then format it in NTFS file system, by giving this command: format fs=ntfs
2. If you receive the following error after executing the format command: "DiskPart has encountered an error: Access is denied. See the System Event Log for more information.", then:
a. Close command prompt.
b. Restart your computer.
c. Log in on your computer as Administrator.
d. Open Computer Management > Disk Management.
e. At the right pane: Right click on the disk and select Format.
f. When the format is completed you can use the disk normally. (Ignore all other steps listed here).
11. Wait until the format operation is completed (this procedure takes a long time) and then type exit to close the DISKPART tool.
12. Close the command prompt window and use the disk normally.
– If you still cannot format your disk then probably the disk is damaged and you must replace it.
– If you want to check your HDD for hardware problems, then follow the instructions mentioned in this article: How to Test and Diagnose your hard drive (HDD) for hardware problems.
That's it! Let me know if this guide has helped you by leaving your comment about your experience. Please like and share this guide to help others.