×![]()
×
×![]()
×
×
Media is write protected
Problem
The error message “Media is write protected” may appear in the following scenarios:
- During image creation, on the image repository machine.
- During image deployment, on the deployment machine.
Cause
- This error occurs when a hard disk is connected to a computer that is write-protected or the hard disk is in read-only mode.
- This error can also occur due to viruses, hardware damage, and registry issues.
Resolution
- Disable the write-protected setting of the hard disk by following the steps given below in the machine where the error has occurred:
- Select Start -> click Run.
- Type regedit and click OK to open the registry editor.
- Go to the key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies.
- If the StorageDevicePolicies does not exist, create it manually by right-clicking on the control key and selecting New -> Key.
- In the right window, double-click on WriteProtect, and set the value to 0. If WriteProtect does not exist, then right-click the new StorageDevicePolicies key and select New —> Dword, specify the name as WriteProtect, double-click WriteProtect, and set the value to 0.
- If it is an external hard disk, disconnect the hard disk and reconnect it. If it is an internal hard disk, restart the machine.
- To disable the Read-only settings of the hard disk, follow the steps given below:
- Select Start, then right-click the command prompt and select "Run as administrator".
- Type diskpart and press Enter. Diskpart prompt will open.
- Type list disk and press Enter. (For volume use list volume)
- Type select disk DISK_NUMBER and press Enter.
NoteSpecify the DISK_NUMBER of the disk that you want to remove read-only settings/write protection. For example, select disk 1. (For volume, use select volume.)- If the disk that you have selected is Offline, then type online disk and press Enter. Otherwise, skip this step.
- Type attributes disk clear readonly and press Enter. (For volume use attributes volume clear readonly)
- Ensure that the hard disk is updated.
- Scan the hard disk using an antivirus application to check if any virus exists.
Keywords: Media is write protected, read only permissions, virus