Removing Write Protection Using Diskpart [Solved/Closed]

Ask a question Alliancepotato - Last answered on Jun 12, 2017 at 05:34 AM by Gm_jim
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)


plus moins
"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?  
Gm_jim- Jun 12, 2017 at 05:34 AM
Mine did that too
plus moins
Thank you for the tip.

Ashu- Oct 3, 2015 at 10:58 PM
This will not format my drive Will it??
Fade- Dec 20, 2015 at 10:17 PM
its now work for my flashdrive verry protected
Craig- Jan 15, 2016 at 05:46 PM
Same here. Wish someone would come up with a way that actually works. :-(
Pathik Fade - Apr 25, 2016 at 02:45 PM
i can not work this
Dickson orengo- Sep 16, 2016 at 03:13 AM
It will not wipe all user account unless u select disk 0
plus moins
super working..

Member requests are more likely to be responded to.

Members can monitor the statuses of their requests from their account pages.

A CCM membership gives you access to additional options.

Not a member yet?

Sign up now. It takes less than a minute and is completely free!