How To Enable Write Protection Of USB Devices Under Windows

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.

storagedevicepolicies

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
Article Name
How To Enable Write Protection Of USB Devices Under Windows
Author
Description
Find out how you can enable the write protection of USB devices when using a Windows PC.
Please share this article

facebooktwittergoogle_plusredditlinkedinmail


Filed under:

Responses to How To Enable Write Protection Of USB Devices Under Windows

  1. will March 18, 2011 at 6:29 pm #

    Made a tool in assembly to do this

    http://img262.imageshack.us/img262/4653/blocker.png

    http://whatsmypass.com/USBStopper.exe

  2. Eyric September 6, 2011 at 7:22 am #

    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?

  3. Becky December 15, 2011 at 1:39 am #

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

  4. Jude January 6, 2012 at 1:16 pm #

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

    • Dave April 3, 2014 at 3:03 am #

      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.

  5. Shohag B. January 13, 2012 at 7:20 am #

    I cant find "StorageDevicePolicies"...im using xp 2005. any one ?

    • Natalie June 7, 2014 at 6:09 am #

      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! :)

      • John September 20, 2014 at 7:36 pm #

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

    • Abdul Mujeeb September 5, 2014 at 12:13 pm #

      "Storage" and "Storage Device Policies" are the same bro....

  6. Gideon January 26, 2012 at 8:35 am #

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

  7. UT January 28, 2012 at 8:41 am #

    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.

  8. eljo February 9, 2012 at 11:26 am #

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

  9. rups February 18, 2012 at 1:02 pm #

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

  10. md February 21, 2012 at 6:38 am #

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

  11. Ganesh March 30, 2012 at 10:57 am #

    Thanks

  12. Mohammed April 4, 2012 at 12:56 pm #

    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.

    • uniqboy March 20, 2013 at 2:13 pm #

      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

      • Helen August 27, 2014 at 11:49 pm #

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

  13. Jude April 5, 2012 at 6:44 pm #

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

  14. Vinz April 14, 2012 at 12:04 pm #

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

  15. schn00 April 18, 2012 at 3:53 pm #

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

  16. MAYIL April 22, 2012 at 8:34 am #

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

  17. chetan patil June 2, 2012 at 7:35 am #

    I tried that app but didn't work

  18. eone June 21, 2012 at 12:27 pm #

    you need to replug the usb device to make it work

  19. Manoj Baghele June 23, 2012 at 1:28 pm #

    Every trick didn't work bakwas:-)

  20. Erick Koston August 10, 2012 at 7:16 am #

    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 !

  21. shhain October 10, 2012 at 11:53 am #

    thank u very much

  22. jasmine October 20, 2012 at 6:42 pm #

    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

  23. hafiz October 23, 2012 at 8:27 pm #

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

  24. KHURRAM PAKISTANI November 1, 2012 at 12:18 pm #

    GREAT GREAT GREAT, THE GREATEST IDEA. THANKS A LOTTTTTTTTTTTTTTTTTTTTTTT

  25. sai November 4, 2012 at 6:10 pm #

    So Thanks

  26. Contractor November 15, 2012 at 9:15 am #

    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.

  27. Vicky November 17, 2012 at 9:12 am #

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

  28. UsbThieve November 19, 2012 at 2:47 pm #

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

  29. Dwayne November 19, 2012 at 10:46 am #

    Hey guys the low level format works try it

  30. Charitha November 20, 2012 at 8:09 pm #

    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...... :)

  31. B. Graham December 8, 2012 at 12:30 pm #

    THANK YOU!

  32. kumar December 9, 2012 at 7:01 am #

    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

    • mon2 March 19, 2014 at 12:02 am #

      mine also cant find it bro T.T

  33. Lucien December 9, 2012 at 12:01 pm #

    THIS DOESN'T WORK !!

  34. boris December 18, 2012 at 5:49 pm #

    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

  35. Jayawikrama December 19, 2012 at 12:43 pm #

    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.

  36. Frank December 25, 2012 at 8:12 am #

    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?

  37. Nim December 27, 2012 at 5:40 pm #

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

  38. gurjar January 8, 2013 at 6:00 pm #

    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

  39. Simon January 15, 2013 at 8:27 pm #

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

    • larry February 5, 2013 at 5:48 pm #

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

  40. Anusha January 28, 2013 at 8:42 am #

    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.

    • hemanth March 30, 2014 at 8:07 pm #

      Does it works for u friend

      • farid April 20, 2014 at 1:34 pm #

        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.

  41. sia February 7, 2013 at 10:29 am #

    thank you

  42. Bob May 13, 2013 at 11:14 pm #

    Tried direction in Registry. No such command,

    Tried your enable / disable ..... didn't work.

  43. Kamando Mihigo May 22, 2013 at 10:53 am #

    thanks for instructions

  44. vicky July 9, 2013 at 10:56 pm #

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

  45. Bo August 25, 2013 at 4:37 pm #

    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

  46. SANGRAM KISHOR MOHANTY October 30, 2013 at 11:30 am #

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

  47. Faizan yousaf November 8, 2013 at 8:16 am #

    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.

  48. NINA November 30, 2013 at 1:22 pm #

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

    • naveen August 8, 2014 at 10:23 am #

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

  49. Praveen December 26, 2013 at 4:54 am #

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

  50. Asad Ali March 12, 2014 at 8:34 am #

    Thanks a lottt!!!

  51. Sabz March 18, 2014 at 9:57 am #

    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...

  52. Kapil March 23, 2014 at 3:22 pm #

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

  53. James April 4, 2014 at 5:23 am #

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

  54. Rashid July 3, 2014 at 2:32 pm #

    There is no any Folder in control Strorage devices Policies

  55. Zahidi August 16, 2014 at 12:50 pm #

    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

  56. jagpreet singh August 27, 2014 at 2:20 pm #

    you r great man
    its work

  57. Dinesh kumarB September 19, 2014 at 8:14 am #

    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

  58. 100Yan September 23, 2014 at 9:02 am #

    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/

Leave a Reply