How to enable USB Flash Drive Write Protection in Windows

Martin Brinkmann
Apr 3, 2009
Updated • Jun 15, 2017
Windows, Windows tips

System administrators may want to limit the use of external USB flash drives by making them read only. This can actually be useful in several situations like preventing users from copying local data to the external device, or preventing malicious software from spreading on a computer network using those flash drives (from an infected computer to the Flash drive to other computer systems it is connected to).

The Windows operating system has a Registry setting that can be used  to enable USB write protection on a computer system so that data can be read from devices connected via USB but not written to. It is like a switch that can be enabled to make use of the write protection, or disable it to allow write processes which is the default setting.

Users who experience problems writing to USB devices might want to take a look at this setting as well if they have the proper rights to do so to see if it is the cause for the issue that they are experiencing.

Enable USB Flash Drive Write Protection in Windows

Start by opening the run dialog box with the keyboard shortcut Windows-R. Type regedit, and hit enter on the keyboard. This should open the Windows Registry editor.

Navigate to the following Registry key:


Look at the sub-keys and see if a key named StorageDevicePolicies is listed. If it is skip this paragraph and read the next. If it is not create the key by right-clicking Control and selecting New > Key

See if there is an entry named WriteProtect. It can be created easily if it is not present by right-clicking in the right window and selecting New > Dword (32-bit) Value from the menu. The following values are allowed for this entry:

  • 0 - This will allow write processes on USB Flash Drives
  • 1 - This will block write processes on USB Flash Drives.

An alternative would be to delete the Registry key WriteProtect completely to enable both read and write processes. A restart or log off is required before the changes take effect.

Group Policy alternative

deny write execute access

If you have access to the Group Policy in your version of Windows, it is available in all professional, ultimate and Enterprise editions, then you can make the changes here as well.

  1. Use Windows-R again to open the run box.
  2. Type gpedit.msc and hit enter. The Group Policy Editor should come up.
  3. If the editor opens up, navigate to the following folder: Local Computer Policy > Computer Configuration > Administrative Templates > System > Removable Storage Access.
  4. Here you find removable disks and removable storage which you can both deny write access, execute access and read access.
  5. To do so double-click the entry and select Enable.

Tip: You find options to disable execute or read access as well there.


Disabling removable disk write access is easy to set up on Windows. You can do so using the Registry, or Group Policy.

How to enable USB Flash Drive Write Protection on Windows
Article Name
How to enable USB Flash Drive Write Protection on Windows
How to restrict USB devices to read only so that write or execute operations are blocked automatically when removable devices are connected to the system.
Ghacks Technology News

Tutorials & Tips

Previous Post: «
Next Post: «


  1. Matthew said on October 26, 2013 at 8:14 pm

    Nothing here helped me!!!

  2. jim said on July 8, 2012 at 9:07 am

    repair_v2.9.1.1 works on my problem.


  3. Mohsin said on May 19, 2012 at 6:10 pm

    none of the above helps me to remove write protection

  4. Anonymous said on June 27, 2011 at 11:49 am

    Doesn’t solve the prob here, unfortunately. Any other suggestions?

    1. Zare said on July 19, 2011 at 4:06 pm

      If you are getting the write protected error go here and search for HT203 Handy Steno 2.0 Repair Tool.

      here is the direct download link anyway

      I am sorry if i am violating any rules by posting links but people really need to get there flash drives fixed.

      Best of luck ! :)

  5. jamael said on June 6, 2011 at 7:07 am

    how can I fix my USB?
    I try the following above but not work in my pc?
    Pls.. help me

    if you know to how to format this problem plss.. help me or share you link…

  6. jamael said on June 6, 2011 at 7:00 am

    thanks to all..

  7. Anonymous said on January 12, 2011 at 11:41 am

    trust me my flash is not working help me un write protect my flash disk

  8. mwesigwa Billy said on January 7, 2011 at 10:25 am

    my usb flash disk from the trqancend company does not allow me to write to it

  9. yogesh said on May 4, 2010 at 3:10 am

    hey frnd i didn’t found this storagedevicepolicies


    after this there was no storagedevicepolicies

  10. Vasily Zaytsev said on April 11, 2010 at 5:47 pm

    To Martin: A big THANX, you helped me!!!

  11. usb flash disk said on March 9, 2010 at 8:35 am

    By successfully entering a password upon insertion of a memory stick, you don’t have to reboot/logoff with each policy change.

  12. SinteK said on February 2, 2010 at 11:01 pm

    Write Protect tutorial fix Here:

    1. Jade said on January 2, 2011 at 3:09 am

      Hi.. I followed your tutorial I checked bothe the disk and volume and they both said the read only setting was No. It is definitely write protected so I continued with your tutorial and it worked great for the disk bit but when I tried it on the volume it came back with “Virtual Disk Service Error: This operation is not supported on removable media”
      I just got a new 16GB memory pen and now this has happened please can you help me as no-one else seems to be able to……!? :@

  13. john macdonald said on January 6, 2010 at 8:13 pm

    this way is failed in all ways that i’ve experted

  14. china usb flash drive said on December 11, 2009 at 2:50 pm

    Protect from outside by making undeletable write-protected dummy “autorun.inf” file using Naevius USB Protector.

  15. steventhompson77 said on July 12, 2009 at 1:23 pm

    Protect from outside by making undeletable write-protected dummy “autorun.inf” file using Naevius USB Protector.

  16. steventhompson77 said on July 12, 2009 at 1:22 pm

    Protect from outside by making undeletable write-protected dummy “autorun.inf” file using Naevius USB Protector:

  17. Sintek said on June 2, 2009 at 2:52 am

    If the Above doesnt Work Try this, I made a tutorial on how i fixed Mine

    It should work for everyone

    1. milka said on January 5, 2015 at 8:20 pm

      Hello, I have done everything the regedit, the command stuff and even downloaded program for fix but that program keeps saying plug in the device, I have it plugged in and it doesn’t find it, recognize it. Any more tips to unlock my write protect on the usb generic card? thank you

  18. Anonymous said on May 31, 2009 at 7:25 pm


    1. chiman patel said on March 6, 2013 at 10:38 pm

      that didn’t work

  19. Abdul Awaes said on May 25, 2009 at 8:26 am

    Thx! for this wonderful tip…

  20. Sintek said on May 14, 2009 at 9:33 pm

    I Made a tutorial how to fix this problem here for this problem i had aswell

    1. me said on April 10, 2010 at 12:53 am

      Hey man this is just perfect, didn’t realize XP had such a useful little dos command set like this. Thanks so much bro!

  21. xiaxia said on April 17, 2009 at 8:28 pm

    There’s a litte freeware program at
    called USB WriteProtector.
    The side is german to be more precise austrian, but easy to browse. The program itself is multilingual.


    1. Anonymous said on July 29, 2012 at 1:12 pm

      THank youuuuuuuuuuuuuuuuuuuuuuuuuuuu soooooo much that s realy works

  22. karthik said on April 7, 2009 at 1:49 pm

    Its very old, i have found more information on this 2 years ago. Ghacks also helped that time.

  23. Giles said on April 4, 2009 at 7:15 pm

    For what it’s worth, I’ve had some success using a product called ‘MyUSBOnly’ (

    It’s not freeware, but it is fairly inexpensive and gives you the ability to whitelist/blacklist individual USB sticks. By successfully entering a password upon insertion of a memory stick, you don’t have to reboot/logoff with each policy change.

  24. Rush said on April 3, 2009 at 8:48 pm

    This is kind of cool for my laptop. It reads data a lot but rarely writes it to removable media.

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.