Technical Anshu
Tutorials Blog
🔒 Write Protected Fix

Pendrive Shows Write Protected Error Three Real Causes and Fixes

The disk is write protected - one message, three completely different causes. A switch on the drive, a setting inside Windows, or the pendrive's own controller locking the memory. Each one has a different fix, and trying them in the wrong order wastes your time.

✍️ Technical Anshu🪟 Windows 10 / 11⏱️ 7 minute read
🎥 The video demonstrates the diskpart attribute fix live - the most common of the three causes

Before you download any tool, answer one question: where does the lock live? If it lives on the drive's body, no command will help. If it lives in Windows, the drive is innocent. If it lives in the drive's controller, the drive is telling you it is dying. This guide separates the three causes so you fix the right one.

Diskpart - attributes disk
DISKPART> attributes disk Current Read-only State : Yes Read-only : Yes
This confirms the lock is active. It does not yet tell you which of the three causes set it.
👆 The lock confirmed by diskpart (example output) - now find out who set it
1

Cause 1 - A Physical Lock Switch on the Drive

Some older pendrives and almost all SD card adapters carry a tiny sliding switch on the side. Slid one way, the card is locked: Windows can read everything but cannot write, delete or format. Flip it to the unlocked position, reinsert, and test. Also check the adapter if you use a microSD card in a full-size adapter - a loose adapter switch is a classic false alarm that makes a healthy card look protected.

2

Cause 2 - Windows Is Ordered to Block Writes

Windows has a policy that makes all removable drives read-only, and some office PCs, school PCs and security tools switch it on. The registry version lives at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies as a value named WriteProtect. If it is set to 1, change it to 0, restart the PC, and test again. The tell-tale sign: every pendrive is write-protected on this one PC, but the same drives work fine elsewhere.

3

Fix for the Attribute - Diskpart Clear Readonly

If only this one drive is locked on every PC, try the video's method. Open Command Prompt, run diskpart, then:

  1. list disk
  2. select disk X - your pendrive, matched by size
  3. attributes disk clear readonly
  4. exit

Remove and reinsert the drive, then copy a small test file onto it. If the write succeeds and survives a reinsert, the lock was just a stuck software flag and you are done.

4

Cause 3 - The Controller Locked the Drive Itself

If the attribute clears and then comes straight back - or diskpart itself reports the clear failed - the lock is not software. The pendrive's controller has detected worn-out flash cells and switched the drive to read-only to protect what is still stored on it. This is the most common cause of all, and it is permanent. Copy off anything you still need while the drive still reads, because reading is the one thing it can still do.

5

The Test That Separates the Causes

One five-minute routine tells you which cause you have:

  1. Try the drive in a second computer - locked there too means the lock travels with the drive
  2. Try a different pendrive in your PC - if it is also locked, your PC's policy is the culprit
  3. Clear the attribute, reinsert, and check attributes disk again - a lock that returns instantly is the controller's
🔴 Be honest with the result: a write-protect lock set by the controller cannot be removed by diskpart, the registry, or any downloadable tool - those only clear software flags. If your lock survives all three fixes, the drive is finished. Claim the warranty if it has one.

🎥 Watch the Full Video Guide

Watch the video to see the attributes command run live and how the result looks on a drive that stays locked.

▶️ Watch Full Video
❓ Frequently Asked Questions

My pendrive has no switch. Why does Windows still call it write protected?

The switch is only one of three causes. Modern pendrives are usually locked either by a Windows policy or by their own controller after detecting failing memory. The diskpart attributes command and the two-PC test tell you which one you have.

Is editing the registry to remove write protection safe?

Changing the single WriteProtect value under StorageDevicePolicies is a normal, reversible Windows setting - set it back to 1 any time. But on an office or school PC that policy was probably set deliberately; ask the IT admin instead of changing it yourself.

The lock cleared, then came back after I removed the drive. What now?

That pattern is the signature of controller-level locking: the drive accepts the command but its firmware re-applies the protection. Treat the drive as read-only storage for rescue only - copy your files off and replace it.

This guide is based on the Technical Anshu pendrive format video • Stuck on a step? Ask in the video comments — you will get a reply 🙏