Navigation

Clear disk or volume read-only attribute with Windows 7 DVD

By . Last modified: 2014-08-14.

How to use bootable Windows 7 DVD for clearing read-only attribute of a disk or volume in Windows XP

This article applies to Windows XP.
Sometimes you might see an error message such as "The operation did not complete because the media is write-protected" or "The volume is read only" while trying to format or initialize a disk. This happens when someone or some program has marked the disk or volume/partition read-only.
Windows XP, Disk Management, The operation did not complete because the media is write-protected. Windows 7, Disk Management, The volume is read only.

Sadly, Windows XP version of command-line DiskPart utility has no ability to set or clear read-only attribute for a disk or a volume, so you need some workaround in case you encounter such error messages.
Windows Vista, 7, 8 and 8.1 users can clear the read-only attribute easily using DiskPart.

Prerequisites

To make a volume or disk writable for Windows XP, you need Windows Vista or Windows 7 DVD. Windows 7 System Repair Disc is also usable here.
You can download the official Windows 7 Home Premium DVD with integrated Service Pack 1 (32-bit) from http://msft.digitalrivercontent.net/win/X17-24208.iso. This is not piracy, as you can actually use Windows 7 without activating it for 30 days - and you're not even going to install Windows in this tutorial! Cool

This is a large download (over 3 gigabytes), so take your time. Burn the downloaded file to a blank DVD using instructions in the Create disc from ISO image article. If you have not installed CDBurnerXP, read the Install CDBurnerXP article first.

Next, make sure your computer is set to boot from CD/DVD. Instructions are in the Computer boot order article.

Booting to Windows 7 Command Prompt

Insert the DVD you created and restart your computer. Press Space or Enter while the message "Press any key to boot from CD or DVD" is displayed and wait until Windows finishes loading files.

Install Windows appears with language and regional options. Select your keyboard layout from the Keyboard or input method combo box and click Next.
Windows 7 DVD, Install Windows. Select your keyboard layout and click Next.

Click Repair your computer in the next screen.
Windows 7 DVD, Install Windows. Click Repair your computer.

Windows setup tries to locate an existing installation, just stand by.
Windows 7 DVD, System Recovery Options. Stand by while setup looks for an existing installation.

Because Windows XP and Windows 7 use different methods for booting, an error message stating "Windows found problems with your computer's startup options" appears. Always click No here, otherwise you might make your Windows XP unbootable!
Windows 7 DVD, System Recovery Options, Windows found problems with your computer startup options. Click No.

Select the Use recovery tools that can help fix problems starting Windows option and click Next.
Windows 7 DVD, System Recovery Options. Click Use recovery tools that can help fix problems starting Windows. Then click Next.

Click Command Prompt in the recovery tools selection window.
Windows 7 DVD, System Recovery Options, Choose a recovery tool. Click Command Prompt.

Clearing the read-only attribute with DiskPart

In the Command Prompt window, type diskpart and press Enter.

The following commands work for both volumes and disks, just replace "volume" with "disk" to make a disk writable.

To see a list of all available volumes, type list volume and press Enter. Find the problematic volume by its size and file system (unformatted volumes have "RAW" written in the Fs column). Note the number of the volume. In this case, the number is 4.
Windows 7 DVD, Command Prompt, DiskPart. Type "diskpart" and press Enter. Then type "list volume" and press Enter.

Now type select volume <the number of volume you need to change> and press Enter. For example, select volume 4.
Then run the attributes volume command and verify the volume is set Read-only.
Finally, type attributes volume clear readonly and press Enter. This will make the volume writeable.
Windows 7 DVD, Command Prompt, DiskPart. Type "select volume <the number of volume you want to change>" and press Enter.

You might want to repeat the same process for other volumes or disks. When finished, run the exit command to return to Command Prompt.

Close the Command Prompt window and click Restart back in the System Recovery Options window. Remove the Windows 7 DVD from the drive.
Windows 7 DVD, System Recovery Options. Click Restart. Then remove the Windows 7 DVD from drive.

That's it - Windows XP should now be able to initialize and format the disk as shown in the Disk Management in Windows article.

 

Sub Navigation

Sub Navigation
Next: Initialize disks with GParted Live
Previous: Disk Management in Windows
comments powered by Disqus