domingo, setembro 27, 2026
Increva-se
Inicio English USB Drive Write-Protected? How to Fix It in Windows Without Installing Anything

USB Drive Write-Protected? How to Fix It in Windows Without Installing Anything

Your USB stick or memory card stopped accepting files and refuses to format? Before throwing it away, learn to clear the read-only lock with Windows' own built-in disk tool.

por tecnologiaxt
Hardware ⏱ 10 min read 📅 September 2026

USB Drive Write-Protected? How to Fix It in Windows Without Installing Anything

Your USB stick or memory card stopped accepting files and refuses to format? Before throwing it away, learn to clear the read-only lock with Windows’ own built-in disk tool.

RC
Let’s rescue that “dead” USB stick with the tools Windows already has, and understand when the problem really is the hardware. I’m Ronaldo Cardoso from Tecnologia Moderna — technical, honest and always free content.
Quick summary

Before throwing the USB stick away:

  • Check the physical switch first on SD cards, adapters and some USB sticks.
  • diskpart clears the read-only flag with attributes disk clear readonly.
  • Select the right disk by its size — choosing the wrong one affects your main drive.
  • A Windows policy can also force read-only — the WriteProtect registry value.
  • If the controller locked itself for wear, no command fixes it: copy the data and replace it.
Hands-on lab

💾 Don’t Throw Your USB Stick Away Yet

You plug in the USB stick, try to copy a file and get “The disk is write-protected”. You try to format it and Windows refuses. Most people give up here and buy a new one — but in many cases the problem is just a read-only flag that can be cleared in two minutes with a tool that comes with Windows.

In this guide you’ll learn the diskpart method step by step, the other causes that produce the same message, and how to tell when the stick has really reached the end of its life.

USB flash drive plugged into a laptop
Everything here uses tools already built into Windows 10 and 11. Nothing to download, nothing to install.
Publicidade
Understand before acting

🔍 Why a USB Stick Becomes Write-Protected

CauseHow to recognise itFix
Physical lock switchSD cards and adapters (and a few USB sticks) have a small slider on the sideSlide it to the unlocked position
Read-only disk attributeThe stick is detected normally, but nothing can be written or formatteddiskpart (steps below)
Windows policy (registry)Every removable drive on that PC is read-only, but works on another computerSet WriteProtect to 0
Company policy / BitLocker To GoWork computers that only allow writing to encrypted USB drivesTalk to your IT department
Worn-out flash memoryThe controller locks itself into read-only to protect the remaining dataCopy the data and replace the stick

Testing the stick on another computer is the fastest way to tell the causes apart: if it works elsewhere, the problem is on your PC, not on the stick.

Step zero

🔒 Check the Physical Switch

It sounds too simple, but it’s the most common cause with memory cards. SD cards and microSD-to-SD adapters have a small slider on the left side. Pushed down, towards the contacts, it means locked.

SD card and adapter with a lock switch
  • Remove the card, slide the switch up (towards the notched edge) and insert it again.
  • Adapters get loose with time: if the switch moves on its own when you insert it, use another adapter.
  • Some USB sticks have a similar switch on the body — check the sides before moving on.
The main method

🛠️ Step by Step: Clearing the Lock With diskpart

1. Open the advanced terminal. Plug in the stick, open the Start menu, type cmd and choose Run as administrator. Elevated privileges are needed to act on the disk engine.

2. List the disks. Type the commands below, pressing Enter after each one:

Command Prompt
diskpart
list disk
Command Prompt running diskpart

3. Select the USB stick. Find its number in the list by the size in GB. Be very careful not to pick your main hard drive or SSD — Disk 0 is usually the system disk. Replace X with the right number:

diskpart
select disk X

4. Clear the attribute. Now remove the flag that forces the hardware into read-only mode:

diskpart
attributes disk clear readonly

The terminal shows “Disk attributes cleared successfully”. Type exit, open File Explorer and try copying a file or formatting again.

Double-check the selected disk before every command. Type “detail disk” after “select disk X” to see the model and size of the selected drive — if it isn’t your USB stick, stop and select again.
Publicidade
If it’s still read-only

🔁 The Volume Can Also Be Read-Only

Sometimes the flag sits on the volume (the partition) rather than on the disk. Still inside diskpart, with the stick selected:

diskpart
list volume
select volume Y
attributes volume clear readonly

Replace Y with the volume number of the USB stick (look at the drive letter and the size). Then type exit and test again.

When every USB drive is read-only

🧩 The Windows WriteProtect Policy

If every USB stick you plug into this PC is read-only — but they work on other computers — Windows itself may be forcing it through a registry value. Check it with this command in an administrator terminal:

Command Prompt (Administrator)
reg query HKLM\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
Windows system settings on screen

If it shows WriteProtect with the value 0x1, set it back to zero and restart the PC:

Command Prompt (Administrator)
reg add HKLM\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies /v WriteProtect /t REG_DWORD /d 0 /f

If the command says the key doesn’t exist, this isn’t your cause — the policy was never set. On company computers, don’t change it: the restriction is probably intentional and managed by IT.

Starting clean

🧼 Recreating the Partition From Scratch

If the lock is gone but the stick still won’t format through File Explorer, you can recreate everything from zero. This erases everything on the stick — copy anything important first, if it’s still readable.

diskpart (with the USB stick selected)
clean
create partition primary
format fs=exfat quick
assign

exFAT works on Windows, macOS, TVs and most devices, and accepts files larger than 4 GB. Use fs=fat32 only for very old devices, and fs=ntfs if the stick will be used only on Windows PCs.

The clean command erases the partition table of the selected disk instantly, without asking. Run it only after confirming, with “detail disk”, that the USB stick is the selected disk.
Publicidade
Honesty first

🪦 When the USB Stick Really Is at the End of Its Life

Flash memory has a limited number of write cycles. When the cells wear out, many controllers deliberately switch the drive into permanent read-only mode — a protection so you can still copy your data. In that case no command, software or trick will bring back writing.

Also be suspicious of very cheap high-capacity sticks: fake drives report, say, 2 TB while having much less real memory, and start failing as soon as you pass the real capacity.

So it doesn’t happen again

🛡️ How to Make Your USB Stick Last Longer

  • Always use “Safely Remove Hardware” / Eject: pulling the stick out mid-write is one of the main causes of corrupted file systems and flags that won’t go away.
  • Don’t use it as your only copy: USB sticks are for carrying files, not for storing the single copy of something important. Keep a real backup elsewhere.
  • Avoid heavy, constant writing: running programs, torrents or cameras recording 24/7 on cheap sticks wears the memory out quickly.
  • Heat and humidity: don’t leave it in the car or near heat sources — flash memory ages faster at high temperatures.
  • Buy from reliable brands and stores: it’s the best protection against fake capacity drives.

Following these habits, a good-quality USB stick can easily last many years of normal use.

Troubleshooting

🔧 Common Errors and How to Fix Them

Message or symptomWhat it means
“Access is denied” when opening diskpartThe terminal wasn’t opened as administrator.
“The media is write protected” during cleanThe controller has locked the drive — usually wear. Copy the data and replace it.
The USB stick doesn’t appear in list diskTry another port and cable, and check Disk Management. If it doesn’t appear anywhere, the fault is physical.
It works, but becomes read-only again laterA sign of worn memory — the controller keeps re-locking it. Replace it soon.
Write-protected only on one PCCheck the WriteProtect value in the registry or company policies on that PC.

Did the stick come back to life? Put it to good use: it can become a official Windows 11 bootable USB for emergencies.

Frequently Asked Questions

FAQ

Does attributes disk clear readonly erase my files?

No. It only removes the read-only flag. Files stay where they are — only the clean command or formatting erases data.

Do I need to install any program?

No. diskpart and reg come with Windows 10 and 11. Everything in this guide uses built-in tools.

Does this work on SD and microSD cards?

Yes, in a card reader. But check the physical switch on the card or adapter first — it’s the most common cause.

The lock came back after I unplugged the stick. Why?

Usually it’s the controller protecting worn-out memory. In that case the fix is copying the data and replacing the stick.

How do I avoid selecting the wrong disk in diskpart?

Compare the sizes in list disk, and after selecting type detail disk to see the model and size. Disk 0 is usually your system drive.

Which file system should I use when formatting the stick?

exFAT for general use and files over 4 GB; FAT32 only for very old devices; NTFS if it will be used only on Windows.

Can a virus make a USB stick write-protected?

It’s rare. Some malware changes the WriteProtect registry value, which is why it’s worth checking it. Run a full scan with Microsoft Defender if every removable drive suddenly became read-only.

Is it worth paying for a “USB repair” program?

Usually not. If diskpart can’t clear the flag, the controller has most likely locked the memory for wear — and no software can bring back writing in that case.

Test your knowledge

🎮 How much did you learn?

Once you pick an answer it locks in — reload the page to try again.

1. What should you check first on an SD card that became write-protected?

2. Which diskpart command removes the read-only flag from the disk?

3. How do you identify the USB stick in list disk?

4. What does the clean command do?

5. If the controller locked the stick because of wear, what should you do?

Compartilhar

Esse conteúdo ajudou você?

Compartilha com alguém que também vai curtir — é rapidinho e ajuda muito o nosso trabalho a chegar em mais gente.

WhatsApp Facebook Telegram X

O Instagram não tem um botão de compartilhar direto pelo navegador — copie o link acima e cole numa Story ou no direct. 😉

Siga a Gente

Não perca nenhuma dica

Conteúdo novo toda semana — direto, técnico e sem enrolação.

Conhecimento só tem valor quando compartilhado.

Manter essa estrutura de laboratórios funcionando e produzir conteúdos de engenharia de forma totalmente gratuita e acessível exige tempo e dedicação diária à bancada. Esse guia salvou os seus arquivos? Você pode contribuir diretamente para manter o nosso trabalho independente forte. Apoie doando qualquer valor!

Quer apoiar a nossa bancada independente?

Tecnologia Moderna © 2026 — Conteúdo escrito por Ronaldo Cardoso. Todas as informações técnicas foram revisadas antes da publicação.

Fique Por Dentro de todas as Novidades

Canal com propósito de Compartilhar, Ajudar e Ampliar conhecimento de todos!

📬

Ronaldo aqui: E aí, para não perder nenhum conteúdo, se inscreva aqui que eu aviso você em primeira mão!

Nos Envie a Sua Dúvida para que possamos criar um conteúdo exclusivo para você, com base na sua dúvida! juntos podemos ensinar outras pessoas!

@2024 – Todos os Direitos Reservado. Desenhado e Desenvolvido por:  Grupo Interativa Marketing  & Technology Center Interativa Marketing