Clear Read-Only flag on Disk in Windows 7 using Diskpart

This is a short HOWTO clear the read-only/readonly flag/attribute on a disk in Windows 7 using the diskpart command from a Windows Command Prompt.

Warning!
Be sure to do this on the right disk since the diskpart command can do serious damage if you run it on the wrong disk.

  1. Open a command window by running the diskpart command from a Command Prompt
  2. Determine which disk you are going to modify:
  3. DISKPART> list disk
    
      Disk ###  Status         Size     Free     Dyn  Gpt
      --------  -------------  -------  -------  ---  ---
      Disk 0    Online          149 GB  1024 KB
      Disk 1    Online          465 GB   465 GB
  4. Select the disk you are going to modify
    DISKPART> select disk 1

    You have now selected disk 1

    list disk
    
      Disk ###  Status         Size     Free     Dyn  Gpt
      --------  -------------  -------  -------  ---  ---
      Disk 0    Online          149 GB  1024 KB
    * Disk 1    Online          465 GB   465 GB
  5. Clear the Read-Only attribute on the selected disk
    DISKPART> attributes disk clear readonly

The disk is no longe Read-Only protected.

If you would like to set the disk Read-Only again just do the same procedure and write

DISKPART> attributes disk set readonly

in the last operation.

When you are done modifying the disk attributes just issue the exit command

DISKPART> exit

and the diskpart windows will be closed.

38 Comments

  1. Jerrell 18. December 2012 Reply
  2. Irfan 4. April 2013 Reply
    • Hans-Henry JakobsenAuthor 5. April 2013 Reply
      • James 15. December 2013 Reply
  3. Tabrian 8. April 2013 Reply
    • Hans-Henry JakobsenAuthor 8. April 2013 Reply
  4. FatBoyIgi 3. May 2013 Reply
  5. Ishwar 7. August 2013 Reply
  6. Chintan 30. August 2013 Reply
  7. Meg 27. September 2013 Reply
    • Hans-Henry JakobsenAuthor 27. September 2013 Reply
  8. Zacc B 6. November 2013 Reply
  9. Rajendra gupta 21. January 2014 Reply
    • Hans-Henry JakobsenAuthor 22. January 2014 Reply
  10. Ketaki 27. January 2014 Reply
    • Hans-Henry JakobsenAuthor 28. January 2014 Reply
  11. Solver 1. February 2014 Reply
  12. Andrew 6. February 2014 Reply
  13. JOGS 16. March 2014 Reply
  14. MaC S3th 8. April 2014 Reply
  15. Ted 8. May 2014 Reply
  16. Masoom ÁLi 28. May 2014 Reply
  17. Masoom ÁLi 28. May 2014 Reply
  18. JFG 11. July 2014 Reply
  19. John 16. October 2014 Reply
  20. Asinine Republic 1. November 2014 Reply
  21. Omar 2. January 2015 Reply
  22. Omar 2. January 2015 Reply
  23. Nitin 4. January 2015 Reply
  24. agbishara@gmail.com 5. January 2015 Reply
  25. Senseisan 27. January 2015 Reply
  26. angelo 13. May 2015 Reply
  27. ASHOK 9. August 2015 Reply
  28. someone 7. June 2016 Reply
  29. Suraz 27. September 2016 Reply
  30. Suraz 27. September 2016 Reply
  31. Hans-Henry JakobsenAuthor 7. October 2016 Reply

Leave a Reply