This article explains how to remove write protection from a USB drive, SD card, or individual files. Instructions apply to Windows 10, Windows 8, and Windows 7.

What to Know

  • Look for a lock switch on the USB drive or SD card and turn it to the off position.Alternatively, use the diskpart command, or change the WriteProtect value in the Windows Registry Editor to 0.For individual files, go to the file’s Properties and clear the Read-only check box.

How to Remove Write Protection Using Lock Switch

If your computer tells you the media is write-protected, look for a write protection switch (also called a lock switch) on the USB or SD card. If the media has this switch, make sure the switch is set to write, not read-only.

How to Remove Write Protection From a Single File

When you have a single file you want to make changes to but can’t, the file may be write-protected. Here’s how to grant writing permissions.

  • Insert the USB drive or SD card into the appropriate port on your computer.
  • Open Windows File Explorer and navigate to the device and folder containing the file.
  • Select the file.
  • Select the Home tab, then select Properties > Properties.
  • Alternatively, right-click the file and select Properties.
  • In the Properties dialog box, select Read-only to remove the check mark.
  • Select OK.

Use Diskpart to Remove Write Protection From USB Drives

There are many ways to remove write protection from USB drives in Windows. One popular method is to change a Registry key, but this is scary to some people. A less intimidating method is to use diskpart.

Insert the USB drive or SD card into the appropriate port on your computer.

Open Windows File Explorer and navigate to the device and folder containing the file.

Select the file.

Select the Home tab, then select Properties > Properties.

Alternatively, right-click the file and select Properties.

In the Properties dialog box, select Read-only to remove the check mark.

Select OK.

  • Insert the USB drive into a USB port on your computer.
  • Press Windows key+X.
  • Select Run.
  • Enter diskpart and then select OK.
  • The User Account Control dialog box may appear and ask if you want to allow this app to make changes to your device. Select Yes to continue.
  • Next to DISKPART>, enter list disk and press Enter.
  • In the list of mounted disks, find your USB drive and note the disk number.
  • Look at the Size column to locate the write-protected flash drive. In this example, the computer hard drive is 29 GB and the USB drive is 977 MB.
  • Enter the command select disk disk_number and then press Enter. If, for example, your drive number is 1, enter select disk 1.
  • When the disk is selected, diskpart displays a message saying the disk is now the selected disk.
  • Enter the command attributes disk clear readonly and then press Enter.
  • When write protection has been removed from the disk, diskpart displays a message stating the attributes were cleared successfully and the disk is no longer write protected.
  • To close the diskpart window when you’re finished, type exit and press Enter.

Remove Write Protection From USB Drives With ‘regedit’ in Windows 10 and Windows 8

If you’d rather use the Windows Registry to remove write protection from a USB drive or SD card, use regedit to make the change.

Insert the USB drive into a USB port on your computer.

Press Windows key+X.

Select Run.

Enter diskpart and then select OK.

The User Account Control dialog box may appear and ask if you want to allow this app to make changes to your device. Select Yes to continue.

Next to DISKPART>, enter list disk and press Enter.

In the list of mounted disks, find your USB drive and note the disk number.

Look at the Size column to locate the write-protected flash drive. In this example, the computer hard drive is 29 GB and the USB drive is 977 MB.

Enter the command select disk disk_number and then press Enter. If, for example, your drive number is 1, enter select disk 1.

When the disk is selected, diskpart displays a message saying the disk is now the selected disk.

Enter the command attributes disk clear readonly and then press Enter.

When write protection has been removed from the disk, diskpart displays a message stating the attributes were cleared successfully and the disk is no longer write protected.

To close the diskpart window when you’re finished, type exit and press Enter.

  • Insert the USB drive into a USB port on your computer.
  • Press the Windows key+X.
  • Select Run.
  • Enter regedit and select OK.
  • In the Registry Editor, navigate to HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > StorageDevicePolicies.
  • If you can’t find the StorageDevicePolicies folder, you’ll need to create a StorageDevicesPolicies key and a WriteProtect DWORD Value. See the next section for instructions.
  • Double-click WriteProtect to open the Edit DWORD dialog box.
  • In the Value data text box, replace the number with a 0 (zero).
  • Select OK.
  • Close regedit.
  • Restart your computer.

Create StorageDevicesPolicies Key and WriteProtect DWORD Value

If you can’t find the StorageDevicePolicies folder in the Window Registry, you’ll need to create a StorageDevicesPolicies key and a WriteProtect DWORD Value:

Before making any changes, back up the Windows Registry. If you make a mistake and have problems with your computer, you’ll be able to restore the Registry and return your system to its original state.

Press the Windows key+X.

Enter regedit and select OK.

In the Registry Editor, navigate to HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > StorageDevicePolicies.

If you can’t find the StorageDevicePolicies folder, you’ll need to create a StorageDevicesPolicies key and a WriteProtect DWORD Value. See the next section for instructions.

Double-click WriteProtect to open the Edit DWORD dialog box.

In the Value data text box, replace the number with a 0 (zero).

Close regedit.

Restart your computer.

  • Navigate to HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control.
  • In the File pane on the right, right-click in an empty space, point to New, then select Key.
  • In the Folders pane on the left, name the key StorageDevicePolicies and press Enter.
  • In the Folders pane, select StorageDevicePolicies.
  • In the File pane, right-click an empty space, point to New, then select DWORD (32-bit) Value.
  • Name the value WriteProtect and press Enter.
  • Double-click WriteProtect to open the Edit DWORD dialog box and remove write protection using the steps above.

Edit the Registry in Windows 7 to Remove Write Protection

If you use Windows 7, the process to edit the Windows Registry to remove write protection is a little different.

Navigate to HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control.

In the File pane on the right, right-click in an empty space, point to New, then select Key.

In the Folders pane on the left, name the key StorageDevicePolicies and press Enter.

In the Folders pane, select StorageDevicePolicies.

In the File pane, right-click an empty space, point to New, then select DWORD (32-bit) Value.

Name the value WriteProtect and press Enter.

Double-click WriteProtect to open the Edit DWORD dialog box and remove write protection using the steps above.

  • Press Windows key+R.
  • In the Run dialog box, enter regedit and press Enter.
  • Navigate to HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services.
  • Select USBSTOR.
  • Double-click Start.
  • In the dialog box, enter 3.
  • Close the Registry Editor.

What Does Write-Protected Mean?

When a USB drive or SD card is write-protected, you can’t change files on the media; you can only view them. On write-protected media, you can read and copy files, but you can’t write to and delete files. Your USB drive and SD cards may become write protected because of a virus, or because the lock switch on the media has been enabled.

Press Windows key+R.

In the Run dialog box, enter regedit and press Enter.

Navigate to HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services.

Select USBSTOR.

Double-click Start.

In the dialog box, enter 3.

Close the Registry Editor.

  • How do I remove write protection on Windows 11?
  • To remove write protection on Windows 11, right-click the file and select Properties > clear the Read-only box.
  • Why does my camera say ‘write protect?’
  • If your camera is giving you a “write-protect” error message, it likely can’t delete or save a photo file because it was designated “read-only” or “write-protected.” Or, your memory card may have a locking tab activated, so it can’t write new files to the card or delete old ones until you disable the locking tab.

To remove write protection on Windows 11, right-click the file and select Properties > clear the Read-only box.

If your camera is giving you a “write-protect” error message, it likely can’t delete or save a photo file because it was designated “read-only” or “write-protected.” Or, your memory card may have a locking tab activated, so it can’t write new files to the card or delete old ones until you disable the locking tab.

Get the Latest Tech News Delivered Every Day