Write protection is a security feature that prevents modifying, deleting, or formatting data on a pen drive or flash drive. While it can be useful in some cases, accidental write protection can be frustrating, making it impossible to save new files or remove existing ones.
In this guide, we’ll explore two effective methods to remove write protection from a pen drive using Registry Editor (Regedit) and Diskpart Command.
Method 1: Removing Write Protection Using Registry Editor (Regedit)
The Windows Registry contains settings that can enable or disable write protection on your USB drive. Follow these steps carefully:
Step 1: Open Registry Editor
- Press Win + R to open the Run dialog box.
- Type
regedit
and press Enter. - If prompted by User Account Control, click Yes to proceed.
Step 2: Navigate to Storage Device Policies
- In Registry Editor, navigate to the following path:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
- On the right-hand panel, locate the WriteProtect entry.
- Double-click on WriteProtect and change the Value Data from 1 to 0.
- Click OK and close the Registry Editor.
Step 3: Restart Your Computer
Restart your PC to apply the changes. After restarting, insert your pen drive and check if it is still write-protected.
Note: If you do not see the StorageDevicePolicies folder, you may need to create it manually:
- Right-click on the Control folder in Registry Editor.
- Select New > Key and name it StorageDevicePolicies.
- Inside the new folder, right-click in the blank space and choose New > DWORD (32-bit) Value.
- Name it WriteProtect and set its value to 0.
- Close the Registry Editor and restart your computer.
Recommended Image: Screenshot of Registry Editor showing the StorageDevicePolicies key and WriteProtect entry.
Method 2: Removing Write Protection Using Diskpart Command
If the Registry Editor method does not work, try using Diskpart, a command-line tool to manage disks and partitions.
Step 1: Open Command Prompt as Administrator
- Press Win + R, type
cmd
, and press Ctrl + Shift + Enter to run it as an administrator. - If prompted by User Account Control, click Yes.
Step 2: Run Diskpart Commands
- Type
diskpart
and press Enter. - Enter the following command to list available disks:
list disk
- Identify your pen drive (e.g., Disk 1) and select it:
select disk 1
- Clear the write protection using:
attributes disk clear readonly
- Clean the disk (this will erase all data):
clean
- Create a new partition:
create partition primary
- Format the pen drive to FAT32 file system:
format fs=fat32 quick
- Exit Diskpart:
exit
After completing these steps, your pen drive should be free from write protection and ready for use.