A USB drive can become corrupted and write-protected for various reasons – physical damage, bad sectors, virus infection, full storage, or registry issues. When this happens, you’ll get errors like “The disk is write-protected” or “Access denied” when trying to modify files on the drive.
Removing write protection and fixing corruption allows you to use the USB drive normally again. Here is a step-by-step guide:
Table of Contents
Diagnose the Issue
First, examine your USB drive closely and check if it has a physical write-protect switch. If yes, toggle the switch to disable write protection.
If there’s no switch, connect the drive to another PC. If you get the same error, it confirms the corruption is with the drive, not your PC.
Back Up Important Data
Before making changes, use data recovery software like Disk Drill to back up important files from the USB drive. This prevents permanent data loss.
Try Quick Fixes
Check for viruses: Run a full antivirus scan. Malware could be blocking access to the drive.
Free up space: A full drive may get write-protected. Check the storage space.
Change permissions: Go to Properties > Security, give your user account full access.
Use CMD: Open admin Command Prompt and type attributes disk clear readonly
to reset read-only attribute.
Remove Write Protection via Registry
If quick fixes don’t work, edit the registry:
- Open Registry Editor and go to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
- Create a DWORD named
WriteProtect
if it doesn’t exist - Double-click it, set the Value Data to
0
, and click OK
This disables write protection on all drives. Reconnect your USB to check.
Clean and Format the Drive
At this point, it’s best to clean and format the USB drive to fix file system errors:
- Open admin Command Prompt
- Type
diskpart
and press Enter - Type
list disk
, note your USB drive number - Type
select disk X
(replace X with your drive number) - Type
clean
, press Enter – this wipes all data - Type
create partition primary
, press Enter - Type
active
, press Enter - Type
format fs=fat32 quick
, press Enter – to format in FAT32
Recover Data from Backup
If you backed up your files earlier, now copy them back onto the freshly formatted USB drive. Avoid storing important data on just one device – always have a secondary backup.
Tips to Avoid Corruption
- Don’t remove the USB drive while files are still being written
- Safely eject before unplugging
- Maintain regular backups
- Use antivirus protection
- Handle the drive carefully to prevent physical damage
Following these steps will remove write protection from a corrupted pen drive, fix underlying issues, and restore usability. Be very careful while editing the registry and formatting drives. Back up your data in advance to be extra safe.
Frequently Asked Questions
What causes a USB drive to become corrupted and write-protected?
Common reasons include physical damage, bad sectors, virus infection, filling up storage space, or incorrect registry settings related to removable drives.
How do I remove write protection without losing data?
Try the quick fixes first like scanning for malware, freeing up space, changing permissions. If that doesn’t work, you’ll need to back up data before formatting.
Is there any software that can unlock write protection?
No special software for this purpose. General partition managers may claim removal of write protection but they use the same Windows tools for this task.
Can I recover files after formatting a corrupted USB drive?
Yes, use data recovery software immediately after formatting to scan the drive and restore lost files. Avoid adding new content before recovery.
How can I prevent future corruption and write protection errors?
Maintain regular backups, use antivirus protection, handle USB drives carefully, don’t remove them abruptly while data transfer is in progress.