Removing write protection using Diskpart [Solved/Closed]

Alliancepotato - Mar 13, 2015 at 04:24 PM - Latest reply:  sadface
- Feb 28, 2018 at 03:37 AM
Removing write-protection using Diskpart

With your USB drive plugged in, launch a command prompt. Do this by searching for cmd.exe in the Start menu (or Start screen in Windows 8). In Windows XP, click Start then Run, and type cmd.exe in the box.

NOTE: you may need to run Cmd.exe with administrator privileges if you see an "access is denied" message.

To do that, right-click on the shortcut and choose Run as administrator. In Windows 8, simply choose Command prompt (admin).

Now, type the following, pressing Enter after each command:


list disk

select disk x (where x is the number of your USB flash drive - use the capacity to work out which one it is)

attributes disk clear readonly


create partition primary

format fs=fat32 (you can swap fat32 for ntfs if you only need to use the drive with Windows computers)


See more 

11 replies

crazymink 1 Posts Wednesday December 30, 2015Registration date December 30, 2015 Last seen - Dec 30, 2015 at 06:07 PM
"attributes disk clear readonly" works but after that clean command received an error : the media is write protected.How to solve this ?
Was this answer helpful?  
Ambucias 51180 Posts Monday February 1, 2010Registration dateModeratorStatus April 25, 2018 Last seen - Mar 13, 2015 at 04:51 PM
Thank you for the tip.

This will not format my drive Will it??
its now work for my flashdrive verry protected
Same here. Wish someone would come up with a way that actually works. :-(
i can not work this
It will not wipe all user account unless u select disk 0
super working..