How To Enable Write Protection Of USB Devices Under Windows

Martin Brinkmann
Mar 18, 2011
Updated • Jul 23, 2014
Windows, Windows tips
|
103

You have probably seen the following scenario in multiple thriller and spy movies; A spy connects an USB stick to a computer to copy data from the computer to the device. Movies do not necessarily reflect reality but there is some truth to this scenario after all. It is indeed possible to connect an USB device to a computer running Windows to copy data from that computer to the removable storage device.

It is sometimes in the best interest of companies, organizations and individuals to protect the data on their computer from being copied this way.

Microsoft has added options to the Windows operating system (more precisely to Windows XP and newer operating systems) to write protect all USB devices that are connected to it. This indicates that it may not always be possible to protect the computer this way, for instance if data needs to be written to USB devices regularly.

Write Protection adds another layer of defense to the computer. The system is not fool proof on its own, as it is still possible to copy data, for instance by uploading it to the Internet or a network connection.

Write Protecting USB Devices

You can enable or disable write protection of all USB devices that are connected to the Windows operating system. Both settings are configured in the Windows Registry. Here is how this is done.

Open the Windows Registry editor with the shortcut Windows-r, enter regedit into the form and press the return key on the keyboard.

Navigate to the following Registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies

Please note that you may need to create the key StorageDevicePolicies if it does not exist. Select the key afterwards and right-click into the right window. Select New > Dword (32-bit) Value from the context menu and name the entry WriteProtect.

Double-click the new entry afterwards and change the value from 0 to 1. A value of 1 disables writing to all connected USB devices. If you want to enable writing again you need to change the value of the key to 0.

The new setting takes effect immediately. Every user who tries to copy data to USB devices with write protection enabled receives the following notification window.

disk is write protected

It reads

Copy File
The disk is write-protected
Remove the write-protection or use another disk.

I have created two Registry files to enable or disable write protection. You can download a zip file that contains both files here: write protect

This way you can disable write protection with a click on a file, and enable it again when you have copied files to the USB device.

Summary
How To Enable Write Protection Of USB Devices Under Windows
Article Name
How To Enable Write Protection Of USB Devices Under Windows
Description
Find out how you can enable the write protection of USB devices when using a Windows PC.
Author
Advertisement

Tutorials & Tips


Previous Post: «
Next Post: «

Comments

  1. Kiran said on December 18, 2017 at 8:54 pm
    Reply

    I had same problem with trancend jetflash pendrive.. Solution for that try to search for trancend jetflash online recovery tool… It restore pendrive in factory settings… Your welcome.

  2. Anonymous said on November 23, 2017 at 6:12 pm
    Reply

    on your windows search for files,write cmd then a black window appears then write on that board this regedit.exe then the screan you see is registry editor i.e regedit.or simply press simultaneuosly window key and R then a small dialog box at left bottom corner appears at that pad write regedit.exe i.e now registry editor

  3. bcstanci said on May 30, 2017 at 9:10 am
    Reply

    Nothing for use…

  4. hadi said on January 3, 2017 at 8:48 pm
    Reply

    no worki

  5. travis said on December 21, 2016 at 10:28 pm
    Reply

    hi i have a flash drive that i bought with a software, now that i am done with that software i need to format it to use for other purposes but its write protected. I have attempted all the methods above but nothing seems to get rid of write protect. Any idea guys are welcome. Help a bother.

  6. Pradip Shah said on September 7, 2016 at 10:48 am
    Reply

    The solutions provided here are of no use. You take this drive to another PC and and it is open to anything you want. What is required is a hardware solution such that it is protected or unprotected on absolutely any PC. What you are doing is just enabling or disabling the particular copy of Windows.

  7. Tushar said on June 10, 2016 at 12:47 pm
    Reply

    I used both 1) Cmd prompt way and 2) Your enable/disable trick also. It doesn’t work. My kingstone pendrive still show “device is write protected” pop-up window.. Plzz help me to sort out this probllem..

  8. GR said on March 30, 2016 at 5:58 pm
    Reply

    Forget it mate… disk write-protection is ON the drive’s EPROM, not in the windows registry so this shouldn’t work.

  9. Susan Hildebrand said on February 10, 2016 at 11:45 pm
    Reply

    Are users where this isn’t working granted administrative permission’s? If you don’t have permission from IT you can not modify the registry. I think you have to sign in as administrator to do these tasks. You may see one operating system but actually be on an IT controlled Server without permission s granted. Group permissions might be affected if that is your access level.
    I will try this to make it harder to be hacked on SD, USB.
    Anyone know how to recover hd partitions when the format changed, my portable was working between xp win7 computers but not so between vista with 7.

  10. yarn said on February 2, 2016 at 7:50 pm
    Reply

    This works:
    1. While no usb inserted, change the registry -> protect disable ->0
    2. insert the SD card
    3. Tested for sample file, it could be written.

    Thanks for the tip.

    p.s. I had to do this 2, 3 time to work out.

    thanks..this is working fine for me as well..

  11. ramiki said on December 27, 2015 at 3:34 am
    Reply

    Sir,
    i have a pen drive, and it is write protected. I am try to disable the write protected. but i couldn’t find StorageDevicePolicies in Registry Editor.
    i am already go on this path:- HKEY_LOCAL_MACHINE\SYSTEM\Currentcontrolset\control\
    but there is not StorageDevicePolicies.

    please tell me any other idea to remove write protected.

  12. Mike said on December 5, 2015 at 1:12 am
    Reply

    Works, thanks alot

  13. Anonymous said on September 23, 2015 at 2:02 pm
    Reply

    This does not work, don’t waste your time

  14. Dev said on March 31, 2015 at 9:04 am
    Reply

    Sir,
    i have a pen drive, and it is write protected. I am try to disable the write protected. but i couldn’t find StorageDevicePolicies in Registry Editor.
    i am already go on this path:- HKEY_LOCAL_MACHINE\SYSTEM\Currentcontrolset\control\
    but there is not StorageDevicePolicies.

    please tell me any other idea to remove write protected.

  15. ali said on February 24, 2015 at 1:38 pm
    Reply

    Bundle of thanks. it works magically. i am wonder to see this working

  16. raveon said on February 10, 2015 at 12:43 pm
    Reply

    the best bet people can do is is forget all about saving the data on your drive and find a third party application to wipe it off the majority of issues with write protection is due to the usb drive being put in a windows 8 pc as I have found out

  17. Themis said on January 13, 2015 at 1:06 pm
    Reply

    Thanks! It worked for me.

  18. Troubleshooter said on December 23, 2014 at 8:21 pm
    Reply

    Type in Run window regedit and click OK

    After registry editor Open Goes to the
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Storage Device Policies\
    In the Right Pane Double Click on Write Protect and Type in Value 1
    Write Protection is Added

    For Remove Write Protection
    Double Click on Write Protect and Type in Value 0
    write protection will be Removed

    Or Simply Download the Application Called USB Write Protector
    For Enable and Disable USB Port its worked for me.
    from http://www.softlinklabs.com/2013/02/usb-write-protector.html

  19. Denny said on October 22, 2014 at 11:39 am
    Reply

    Hi,
    I have problem on my Micro SD Card. my care need password , But I never put any password on it , please some body solve my
    problem …???

  20. 100Yan said on September 23, 2014 at 9:02 am
    Reply

    This work for me, after I tried almost everything !
    Thanks to Kiwi who found this solution
    download link: http://www.patriotmemory.com/partners/usb_restore/Restore.rar

    from this forum
    http://www.pcadvisor.co.uk/how-to/storage/3456666/how-format-write-protected-flash-drive/

    1. Subhankar said on August 5, 2015 at 7:14 pm
      Reply

      Thanks for the info…….it saved my 32 gb sandisk ultra pendrive……..all other solutions failed……….YOU ROCK MAN !!!!……

    2. Subhankar said on August 5, 2015 at 7:11 pm
      Reply

      Thanks for the info……it saved my 32 gb sandisk ultra pendrive…….YOU ROCK MAN !!!!!

  21. Dinesh kumarB said on September 19, 2014 at 8:14 am
    Reply

    hi sir
    i am using windos 7, 64 bit, i cretaed write protect in regedit but can’t format my pendrive , please tell any other way to format

  22. jagpreet singh said on August 27, 2014 at 2:20 pm
    Reply

    you r great man
    its work

  23. Zahidi said on August 16, 2014 at 12:50 pm
    Reply

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies\WriteProtect.

    I’ve changed the “WriteProtect” value to “0” … but I still cannot copy file to my USb drive.
    I used the same USB on other laptops, and I can copy.
    Please advise. TQ

  24. Rashid said on July 3, 2014 at 2:32 pm
    Reply

    There is no any Folder in control Strorage devices Policies

  25. James said on April 4, 2014 at 5:23 am
    Reply

    Hello, Is there any solutions aside from the registry. it didn’t fix on me.

  26. Kapil said on March 23, 2014 at 3:22 pm
    Reply

    Hey , I;d tried to change value 0 to 1 and vice versa but valve was unchanged

  27. Sabz said on March 18, 2014 at 9:57 am
    Reply

    I tried all of the above tips and tricks but none work, have a 2TB external Samsung hdd and whether using cmd icacls, diskpart or even changing the value via regedit does not work, is this perhaps due to setting by my company? My hdd works fine on my personal laptop…
    I’m sure there must be a way to overcome this situation and would appreciate someone expert advice on this…

    Thanks…

  28. Asad Ali said on March 12, 2014 at 8:34 am
    Reply

    Thanks a lottt!!!

  29. Praveen said on December 26, 2013 at 4:54 am
    Reply

    Can’t thank you enough. This works great!!

  30. NINA said on November 30, 2013 at 1:22 pm
    Reply

    THANKSSSSSSSSSSSSSSS I LOVE ALL OF YOU. MY USB IS NOW FORMATTED AND everything is oko

    1. naveen said on August 8, 2014 at 10:23 am
      Reply

      please help me for same problem of pendrive.how to remove the write protection in pendrive.

  31. Faizan yousaf said on November 8, 2013 at 8:16 am
    Reply

    hello i cant find storage device policies in that box and i am facing still rite protection .how can i remove this from my sd card slot.i am using widows seven 64 bit operating system.pls can any one help me.

  32. SANGRAM KISHOR MOHANTY said on October 30, 2013 at 11:30 am
    Reply

    after tired to navigation HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
    the StorageDevicePolicies navigation did not show my computer, then please say the solution

  33. Bo said on August 25, 2013 at 4:37 pm
    Reply

    the registry trick were work well on non error USB Fdisk, but my error one still can’t solved. is it a must that i use the registry trick at computer where it caused my Fdisk Write protected??or just use any random computer??coz i found my Fdisk “write protected” after i copied a game from public internet service then the Fdisk turn “write protected” also the size of the file seems error

  34. vicky said on July 9, 2013 at 10:56 pm
    Reply

    ‘m using window xp 2..can u help me on xp

  35. Kamando Mihigo said on May 22, 2013 at 10:53 am
    Reply

    thanks for instructions

  36. Bob said on May 13, 2013 at 11:14 pm
    Reply

    Tried direction in Registry. No such command,

    Tried your enable / disable ….. didn’t work.

  37. sia said on February 7, 2013 at 10:29 am
    Reply

    thank you

  38. Anusha said on January 28, 2013 at 8:42 am
    Reply

    my mobile memory card (transcend 2GB) is write protected and i cant able to copy anything to it. I am using samsung mobile. I have checked many of the samsung users, all of their memory cards are write protected. Please provide me the solution to remove write protection.

    1. hemanth said on March 30, 2014 at 8:07 pm
      Reply

      Does it works for u friend

      1. farid said on April 20, 2014 at 1:34 pm
        Reply

        I have a SanDisk Flash and it has this problem too. but when I tried to unprotect as remembered above and also through StorageDevicePolicies . it is not worked so pleas help me.

  39. Simon said on January 15, 2013 at 8:27 pm
    Reply

    Brilliant. Thank you! thank you! thank you! Problem solved (SanDisk 32 GB)

    1. larry said on February 5, 2013 at 5:48 pm
      Reply

      strong stuff man,strong stuff,works perfectly!!!!

  40. gurjar said on January 8, 2013 at 6:00 pm
    Reply

    you can also enable write protection by cmd

    for this run cmd as administrator then

    type command

    1- diskpart
    2 – list disk
    3 – select disk # | where # is the no of your flash drive say 1
    4 – attributes disk set readonly | for removing write protection “attributes disk clear readonly”
    5 -exit

    now your flash drive is write protected for more detail watch this video http://www.youtube.com/watch?v=xw_qkW98Qqs

  41. Nim said on December 27, 2012 at 5:40 pm
    Reply

    Thanks a lot! Worked perfectly when I changed the value!

  42. Frank said on December 25, 2012 at 8:12 am
    Reply

    hey, i found nothing,,
    i can’t access “right click”
    i can’t access “run”
    i can’t access “task manager”
    (try to hack Online game centre) :D
    can you help me out?

  43. Jayawikrama said on December 19, 2012 at 12:43 pm
    Reply

    This works:
    1. While no usb inserted, change the registry -> protect disable ->0
    2. insert the SD card
    3. Tested for sample file, it could be written.

    Thanks for the tip.

    p.s. I had to do this 2, 3 time to work out.

    1. crispy said on May 29, 2017 at 1:13 pm
      Reply

      tried this didn’t work for me

  44. boris said on December 18, 2012 at 5:49 pm
    Reply

    txh this solved my problem :)
    didn’t read the comments, but i downloaded the file and in the registry i changed value from 1 to 0, and worked perfectly

  45. Lucien said on December 9, 2012 at 12:01 pm
    Reply

    THIS DOESN’T WORK !!

  46. kumar said on December 9, 2012 at 7:01 am
    Reply

    In the regedit,

    storage dive policies option is not available.

    My new 16GB sandisk pendrive is having write protected problem.

    If anyone could find a solution, please mail it to satishkmr@gmail.com

    1. mon2 said on March 19, 2014 at 12:02 am
      Reply

      mine also cant find it bro T.T

  47. B. Graham said on December 8, 2012 at 12:30 pm
    Reply

    THANK YOU!

  48. Charitha said on November 20, 2012 at 8:09 pm
    Reply

    Thanx a lot…. It was resolved write protect issue of my Kingston 32GB pen drive. I have download that registry files and just run it. After that my issue was solved. Thanx again…… :)

  49. Dwayne said on November 19, 2012 at 10:46 am
    Reply

    Hey guys the low level format works try it

  50. UsbThieve said on November 19, 2012 at 2:47 pm
    Reply

    i just stole this Skyblue 8gb usb but its write protected…cant solve using u rec. help…..

    1. nicky said on September 8, 2017 at 8:23 am
      Reply

      karmas a bitch

  51. Vicky said on November 17, 2012 at 9:12 am
    Reply

    Thnx alott guys……………….it worked 4 me………………!

  52. Contractor said on November 15, 2012 at 9:15 am
    Reply

    The Registry will not allow me to change the value from 1 to 0. I tried to do this via Group Policy which is how this has been implemented but it sill does not allow the read only registry section to be modified.

    Hence only read access to any USB device is permitted as per policy.

  53. sai said on November 4, 2012 at 6:10 pm
    Reply

    So Thanks

  54. KHURRAM PAKISTANI said on November 1, 2012 at 12:18 pm
    Reply

    GREAT GREAT GREAT, THE GREATEST IDEA. THANKS A LOTTTTTTTTTTTTTTTTTTTTTTT

  55. hafiz said on October 23, 2012 at 8:27 pm
    Reply

    nothing happen after i tried all the trick..please help me.

  56. jasmine said on October 20, 2012 at 6:42 pm
    Reply

    May i know how to go to window registry?
    I’ve just bought a new 8 GB pendrive, it works fine for the past 1 week. However, it’s write protected now. I couldn’t delete files in the pendrive nor copy new files into it.
    I couldn’t format the disk too.
    I’ve downloaded UFIX, however, i couldn’t execute the disk in control disk.
    Please help to recover my pendrive, suggestion highly appreciated.
    Thanks

  57. shhain said on October 10, 2012 at 11:53 am
    Reply

    thank u very much

  58. Erick Koston said on August 10, 2012 at 7:16 am
    Reply

    peoples, you can resolve this if you put a windows cd-rom and put to format the Hard-Drive, in the list of hard drive you select the pen-drive write protec and format him, only format, dont instal nothing, or you can put to put windows in the usb and in the middle of instalation put out the usb, this will cause a corrupt usb, in a RAW format, now in the windows, enter in disk management and create a new simple volume ! its easy !! hugs !

  59. Manoj Baghele said on June 23, 2012 at 1:28 pm
    Reply

    Every trick didn’t work bakwas:-)

  60. eone said on June 21, 2012 at 12:27 pm
    Reply

    you need to replug the usb device to make it work

  61. chetan patil said on June 2, 2012 at 7:35 am
    Reply

    I tried that app but didn’t work

  62. MAYIL said on April 22, 2012 at 8:34 am
    Reply

    i follow those above steps but still itis write protect only hoe to disable it help me

  63. schn00 said on April 18, 2012 at 3:53 pm
    Reply

    Thanks bro…….it works for me very well:D

  64. Vinz said on April 14, 2012 at 12:04 pm
    Reply

    Please Help Me To Remove The Write Protection Of My Genx 32gb Flash Drive… Thanks

  65. Jude said on April 5, 2012 at 6:44 pm
    Reply

    I think the problem is due to virus infection. If you tried all the above without success, just throw it away.

  66. Mohammed said on April 4, 2012 at 12:56 pm
    Reply

    I have 4 GB Sony pen drive usb 2.0. I try to open getting pop msg–> Do you want to formate. After formate again getting msg like –> The operation did not complete because the media WRITE PROTECTED. I try from Manage–> Disk Management also –> windows not succesfull formate… Its very challenging to us. could you plz help me on this.

    1. uniqboy said on March 20, 2013 at 2:13 pm
      Reply

      Try using Diskpart:
      open command prompt
      Type ‘Diskpart’-> ‘list disk’ -> ‘select disk ‘
      ->’attributes disk clear readonly’ ->exit
      Done!
      for details, check:
      tech-soln.blogspot.in/2013/02/how-to-enable-or-disable-write.html

      1. SS said on January 25, 2016 at 11:00 am
        Reply

        These doesn’t work for me I tried 5 times. I says it is cleared but after I access the USB same problem that it is write protected :((

      2. Helen said on August 27, 2014 at 11:49 pm
        Reply

        Thank you so much! DiskPart worked whereas the registry mods didn’t.

  67. Ganesh said on March 30, 2012 at 10:57 am
    Reply

    Thanks

  68. md said on February 21, 2012 at 6:38 am
    Reply

    tq, it worked, after 2 wks of search i finally got the ans, tq again

  69. rups said on February 18, 2012 at 1:02 pm
    Reply

    hi dear thanks for suggestion for my problem
    i am solve problem

  70. eljo said on February 9, 2012 at 11:26 am
    Reply

    It worked in my office pc where writing to usb stick was disabled.
    Thanks a Lot!!!!

  71. UT said on January 28, 2012 at 8:41 am
    Reply

    You guys would like to check out the solution given on this page. If this didn’t work then your disk might be corrupted. This sounds hard but I fear that this might be the only reason. Mine Kingston DataTraveller also failed like this, so I am also in shock. Here is the link: http://techsalsa.com/solution-to-remove-write-protection-from-usb-pen-drive/

    Hope this helps.

  72. Gideon said on January 26, 2012 at 8:35 am
    Reply

    I have tried to remove the write protection using windows and its not working? what next?

  73. Shohag B. said on January 13, 2012 at 7:20 am
    Reply

    I cant find “StorageDevicePolicies”…im using xp 2005. any one ?

    1. Abdul Mujeeb said on September 5, 2014 at 12:13 pm
      Reply

      “Storage” and “Storage Device Policies” are the same bro….

      1. aman said on May 31, 2016 at 10:01 am
        Reply

        but in storage i cant find writeprotect option

    2. Natalie said on June 7, 2014 at 6:09 am
      Reply

      He mentioned you may need to create – the key – he did leave instructions on “How To” I just did it and I’m a 47 yr old female! :)

      1. Anonymous said on June 30, 2017 at 8:30 am
        Reply

        Sorry for how you struggled in that process. This is how people struggle to seek true salvation which is found through Jesus Christ Only. Congratulation for being able to seek for help. Cheer up Mom. As you struggle in solving the problem of USB, please do not forget to seek true Salvation in Jesus Christ. Be blessed.Rev Yusufu from Tanzania.

      2. Francisco said on February 11, 2018 at 4:16 pm
        Reply

        Unhappily you are going to find no salvation in the one does not exist. As Kenyata said “when british arrived to Kenya with their bibles, we had the lands. Now we have the bible … and they are the lands OWNERS!!!
        Dont be silly. It is a huge error change land for “heaven”. (Have you ever witness food coming from sky???)

      3. John said on September 20, 2014 at 7:36 pm
        Reply

        does it really matter that you’re a 47 year old female ?

  74. Jude said on January 6, 2012 at 1:16 pm
    Reply

    I followed all your instructions here, yet it didn’t work. What do I do next?

    1. Dave said on April 3, 2014 at 3:03 am
      Reply

      Tried this but any little USB flash stick still says I need permission to write to it. Windows 7 Pro. Used to work and now simply doesn’t. No AV or firewall (both off) and works fine on old Vista laptop. DiskPart did nothing. Formatted to NTFS so I could take ownership. Doesn’t matter. I have no permission to any USB device I put in the USB port.

  75. Becky said on December 15, 2011 at 1:39 am
    Reply

    I tried this to disable write protection on my flash drive but it didn’t work.

    1. Anonymous said on November 18, 2017 at 8:57 am
      Reply

      same here

  76. Eyric said on September 6, 2011 at 7:22 am
    Reply

    thanks for that application..

    my problem is my transcend 8gb flash drive is write protected
    even though it does not have a switch for write protected and unprotected.

    i tried to fiz the registry, the device manager, but it has no effect.

    i tried transcend online format but it says that no flash drive detected.

    any body can help me?

    1. ediltizon said on December 11, 2015 at 8:10 am
      Reply

      just follow the steps..explore it man you can do it

  77. will said on March 18, 2011 at 6:29 pm
    Reply

    Made a tool in assembly to do this: http://whatsmypass.com/USBStopper.exe

    1. Rohan said on November 30, 2015 at 8:31 am
      Reply

      Thanks Dude Worrks 100% Thank You

      1. farman said on November 9, 2016 at 9:06 am
        Reply

        it does not work and i tri on regedit and diskpart but not work what can i do for this

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.