Delete Write Protection on USB with CMD

USB write protection can come from a physical lock switch, Windows disk attributes, registry policy, damaged controller firmware, or a failing flash drive. CMD can remove software-level read-only attributes, but it cannot fix a broken USB controller or a hardware lock.

Delete Write Protection on USB with CMD

What to Know First

Windows Method and Background

  1. Open Command Prompt as administrator.
  2. Type diskpart, then list disk.
  3. Type select disk N, replacing N with the USB disk number.
  4. Type attributes disk clear readonly.
  5. Exit DiskPart, unplug the USB drive, reconnect it, and test file copy again.

Use Qiling Disk Master After Write Protection Is Cleared

Use CMD or DiskPart first to clear software-level read-only protection. Then use Qiling Disk Master only if the USB becomes writable and still needs formatting or partition repair.

check the USB drive after clearing write protection with CMD

Case A. CMD Clears the Write Protection

Step 1. Reconnect the USB drive and test whether you can copy a small file to it.

Step 2. If it is writable but the file system is damaged, select the USB drive by capacity and removable-drive layout.

Step 3. Choose Format, then select exFAT for broad device compatibility or NTFS for Windows-only use.

format the USB after CMD clears write protection

Step 4. Preview the operation and click Proceed.

Case B. The USB Has Damaged Partitions After Protection Is Removed

Step 1. Copy or recover readable files first.

Step 2. Delete the damaged USB partitions only after files are safe.

Step 3. Create one new partition, choose exFAT or NTFS, and assign a drive letter.

create the USB partition after write protection is removed

Step 4. Preview the delete/create tasks and click Proceed.

Case C. Write Protection Remains

Step 1. Do not force format or clean the USB if Windows still says it is write-protected.

Step 2. Check for a physical lock, try another computer, and replace the USB if the protection returns or the controller is failing.

Conclusion

CMD can remove software read-only attributes, but not every write-protected USB is repairable. If write protection returns, replace the drive after recovering files.

Related Articles


Is this information helpful?     

What can we do to improve this information? (Optional)
Refresh Please enter the verification code!


QilingTech uses cookies to ensure you get the best experience on our website.  Learn more  Got it