Protected disk

When we connect a new external USB drive or any storage unit to our PC it is possible to run into the error “The disk is write protected”a common error on disks formatted on other computers and write-protected at both the hardware and software levels.

Fortunately, there are numerous procedures for unlock a write-protected disc, which can be applied quickly to immediately start writing or saving new files on the disc in use. Let’s see together what to do to unlock a write protected diskusing only tools built into Windows.

READ ALSO -> How to encrypt disk on Windows and Mac

Use BitLocker for unlocking

If the disk is BitLocker protected it will be inaccessible for reading and writing. In this scenario we can unlock the unit by entering the BitLocker unlock code when prompted by the Windows interface.


The code is generated by BitLocker itself at blocking and is usually saved in a dedicated file or as a paper file (printed on the spot), although you can save it online in the secure Windows cloud.

If the disk is owned by us and we have chosen to save the BitLocker code online we can retrieve it from the code recovery page BitLockerwhere it is sufficient to enter the Windows credentials (also used on the PC that created the BitLocker encryption) to retrieve the unlock code.

To learn more we can read our guide how to activate Bitlocker on Windows 11 and 10 for disk or USB encryption.

Remove read-only attributes

Another method of unlocking a write-protected disk is to use diskpart, a tool integrated into the Windows command prompt. To proceed we open the Start menu, we search cmdright click on the item Command Prompt and we choose Run as administrator.

In the new window we type diskpart and, as soon as the tool is ready, we enter the command list disk. We identify the number of the disk protected as read-only (for example Disco 1) and type as a new command select disk 1 (or any number assigned in the previous list).

Now that the disk is selected let’s remove the read-only attributes from the disk by typing the following command:

attributes disk clear readonly

To confirm, press Enter on the keyboard, then type exit and confirm to exit the tool diskpart. Now the write protected disk will be unlocked and we can write on it again.

Check the disk for errors

If the writing problems continue despite the advice seen so far, there may be some problem with the disk sectors or with the general health of the disk itself.

To start a diagnosis of the health of the disk we right-click on the Start menu, we open Disk managementright-click on the disk locked in writing, press the menu Propertylet’s go to the card Instruments and press on Check it out below the section Error checking.

Error checking

We await the end of the scan: if minor errors are found, the tool itself is able to mark the bad or unrecoverable sectors, so that you can continue to use the disk (even if it is still convenient to save your personal files somewhere else ).

Format the disk

If the file system errors are too serious and the tool seen in the previous chapter has not solved anything, the last resort to recover a write-protected disk is to quick formatlosing all files on the disk.

To proceed we open the application File Explorerwe press with the right button on the locked disk and press on in format. In the new window we confirm all the basic parameters (in particular by ticking the option Quick format) and press OK to apply the formatting.

If the disk becomes accessible again we can try to recover previously inaccessible files nowusing a program such as Recuvaone of the best for recover files from a formatted drive.


Write-protect a disk it is certainly useful when we do not want the data and files inside it to be deleted accidentally or to prevent other people from using our key, but it can be a problem when we use hard drives after some time or loaned by other people. The recommendations presented in this guide solve this, in particular by acting as a diskpart and removing the write-only attributes applied to the entire disk.

If a USB key or a memory card (SD card or microSD) falls victim to this error, check that there is no protective tab on the side of the same: often this small detail escapes most, who find the key. write-locked for a hardware button.

Still on the subject of encryption, we can read our guides on how encrypt PC disk and Windows startup with Veracrypt and how password protect files and folders on Windows.


Please enter your comment!
Please enter your name here