My SanDisk Ultra USB 3.0 flash drive suddenly became write-protected, so I can't add or modify files. I tried formatting it, using DiskPart, and changing registry settings, but none of those worked. The problem also occurs when I connect it to another computer. Is there anything else worth trying, or is the drive probably failing because of its age?
3 Answers
Flash drives often switch themselves into permanent read-only mode when the controller detects that the memory is failing. This protects the existing data, but it usually means the drive is at the end of its life. Copy off anything important and replace it. You could try the official SD Memory Card Formatter as a final test, but if that also fails, the drive is done.
I only have a couple of unimportant files on it, so I'll replace the drive. Thanks for the explanation.
If the drive is several years old and remains write-protected on multiple computers, replacing it is the sensible option. Some SanDisk models have a multi-year warranty, so check whether yours is still covered before buying a replacement. Use a reputable-quality flash drive for the next one.
First rule out a computer policy. Check the registry value at HKLMSYSTEMCurrentControlSetControlStorageDevicePoliciesWriteProtect and set it to 0 or remove it, then reboot. Also check the removable-storage write-access policies in Group Policy. Since you already tested the drive on another computer and it stayed read-only, though, this points strongly to a hardware failure rather than a Windows setting.

The write protection was already present before I tried formatting, and the format operation was blocked by the same error.