How to Write-Protect Your USB Flash Drive
Many a time, it becomes necessary for us to write protect our USB flash drive so as to protect it from viruses and other malware programs. Because flash drives are so popular and most widely used to move data between computers, they are the prime target for attackers as a means to get infections spread around the computer world. Also, since USB drive is not a Read-Only Memory (ROM), the data inside it can easily be modified or deleted by malware programs.
But unfortunately, most of the new flash drives do not come with a write-protect feature as the manufacturers wish to cut down the cost of production. Hence, the only way to write-protect your USB flash drives is to enable this feature on your own computer.
This can be done by adding a small entry to the Windows registry which acts as a switch that can be enabled to make use of the write protection or disabled to allow write access. Just follow these steps:
Open the Registry Editor (Open the “Run” dialog box, type regedit and hit “Enter”).
Navigate to the following Registry key:
Create a New Key named as StorageDevicePolicies. To do this, right-click on Control, again click on New->Key and name it as StorageDevicePolicies.
Now right-click on StorageDevicePolicies and create a New->DWORD (32-bit) Value and name it as WriteProtect.

Double-click on WriteProtect and set the Value data to 1.
Now the right-protection for USB drives is enabled on your computer (no restart required) and thus it would not be possible for anyone or any program to add/delete the contents from your USB flash drive. Any attempt to copy or download the files onto the USB drive will result in the following error message being displayed.

To revert and remove the write-protection, all you need to do is just change the Value data for WriteProtect (Step-5) from 1 back to 0. Now write access to all the USB devices is re-enabled.
Sometimes it may seem difficult to remember and follow the above mentioned steps each time you want to enable/disable the write protection. Hence as an alternative way, there are many tools available to automatically enable/disable the write-protection feature. One of my favorite tool is USB Write Protect by Naresh Manadhar.
Using this tool, you can limit write access to your USB drives with just a click of a button. You can download this tool from the following link:
By using/following this site you agree to our Legal Disclaimer

The software is not working on Windows 7 (SP1)..
@ Ankit Das
You need to run the application as an administrator (Right-click on the software and select “Run as administrator”). Only then it should be able to enable/disable the write-protect feature.
Yes it’s good but how to learn such things. Mainly focus on about registry and how to clean that and what’s the other use of that and how to that what to edit in registry.
hi am a bca student and u r the best, i want to desable my task mngr, my document and control pannel and command promt plz guide my self
Cool, But This will only be in my comnputer? When i plug USB in another computer so he can easily Modify/delete my data. Right?
Nice Post
I like All The Content Available here..
please tell some trick to protect hard disk and pen drive…
I am Gaurav Garg From http://www.hackersfind.com
Thanks If You Post Related To HDD Safty
@ Sumeet Kukreja
Yes! It works only on your computer. For other computers, you need to first enable the write protection before inserting the USB drive.
Yes it’s good but how to learn such things. Mainly focus on about registry and how to clean that and what’s the other use of that and how to know for different different things that what to edit in registry.
Nice registry hack
awesome !!
which college are you from , and from where did you get these info …
and how do understand every term of os.
m a noob , want 2 be pro.
well thanx really appreciated … : )
Yes,
It is working.
Thank you.
thanx …: )
dude r u ethical hacker or something ???
u r like “indian adrino lamo” ,,./../
well keep up the good work … !!!
Fantastic Tutorial Dude !!
hello shrikanth
this is a good one post
but my question is IS THERE ANY PROGRAM WHICH CAN LOCK USB LIKE A folder lock WHICH REQUIRE PASSWORD WHILE CONNECTING IN EVERY COMPUTER
.
Nice trick sir……….
Great !!!! it Really works
It really works
u need to remove the usb after assigning The Value
nice tutorial..
nice work…it realy works
Nice trick with registry!!! But beginners should be careful while editing registry values. Anyway thanks for sharing this nice tip.
Hey,
Nice one, Thanx for sharing. However, I have heard now a days usb flash drives are coming with some hardware lock as well. Is that true?
Hey really informative post.
during net surfing i found http://hackingpress.blogspot.com/
this website useful.
and looking for further new posts
Really useful..thanks a lot…Like all the tricks on this site..
Hello, this protection is getting reflected on my computer only. If we want to secure our USB flash drive from reading and writing to other system then wats the procedure??
@ Zeeshan
I will come up with a new post on your query…
My website is in french. Gohacking is a superb website!!!!!
how to make a cd/dvd uncopyable plzz reply me
ok.nice work…it realy works
A very useful article.Thanks for sharing
after doing above steps will it possible for a virus to enter my PC’s Hard Disk
after opening USB drive
Thi i really great thing. Thank a lot 4 thi tech. If u have more idea of virsu so,pl. tell m……. Thanx…….
Hello Sir,
I’m reading your posts since 3 (or more years , don’t remember exactly) years. You are an inspiration for me. I started learning Programming languages after completing my 12th two years back.
Right now, I have created hundreds of .Net Applications and games editing tools (for GTA) written on C#.I’m working on a talking sensible robo.
All the credits goes to you and I would to express my thanks to you for sharing these wonderful thoughts and post.^_^
Hi,Srikant
can u please tell what will happen if i install windows update.
I am using windows 7
Yes it definitely works. thanx for the post
…? My Regedit isn’t working, it says: “Registry editing has been disabled by your administrator.” Even though i opened it again, by using “Run as administrator” it still gives me the same pop-up message, and won’t let me access it!! Help!! How do i enable it??!!??
@ RYME
I suspect your PC to have a virus/malware infection. Perform a full system virus scan and see if it helps!!!
it’s really amazing.
It only works on the computer where u have done the above info. not in the pendrive or usb
for 62 bit how its work.
what a trick……….
How to create own bootable file?
Can u help please!!!!!
Hey dude my pendrive is already write protect but its not a re enable so how can i do to re enable my pendrive plz tell me dude
This stuff is soo cool.. nobody messes with my system and flash drives again.. Thanks man!!
well i wana to instal xp wid the help of usb device….will u help me ??? i shall be highly thankful to u
Thank you very much sir very nice tricks.
It’s working…….
hii… Srikant
yr site is amazing and full of hacking tricks.
sir,u r great,thanks 4 all,
I’ve know a lot on this site.. keep going men..!! hehehehe..
Leave your response!
EMAIL SECURITY »
How Do Email Spam Filters Work
If you are the one who works with emails on a daily basis, you are most likely to be using a SPAM FILTER to ease the job of sifting through a large number of spam emails …
HOW STUFFS WORK »
How Antivirus Software Works
Due to ever increasing threat from virus and other malicious programs, almost every computer today comes with a pre-installed antivirus software on it. In fact, an antivirus has become one of the most essential software package for every computer.
Even though every one …
HOW-TO GUIDES »
How to Retrieve Clipboard History in Windows
Ever copied a code snippet or text from the web and forgot to paste it before you copied something else? Well, all of us will have an experience of something like this, where we want to …
INTERNET SECURITY »
Access Your Facebook Account with 3 Passwords
Did you know that you can login to your Facebook account using 3 different passwords? Seems interesting isn’t it? Yep! Unlike any other online account which has only one password to access, Facebook lets you …
NETWORK HACKS »
Access Your Facebook Account with 3 Passwords
Did you know that you can login to your Facebook account using 3 different passwords? Seems interesting isn’t it? Yep! Unlike any other online account which has only one password to access, Facebook lets you …
Categories
I am the author and founder of GoHacking.Com. It all started in November 2007 as a small blog with just a few pages.
However, with the passage of time, the blog picked up more traffic and the response from the readers was also increased. This made me take up blogging more seriously.
You can read more about me or get in touch with me on Google+ or contact page.
Most Commented
Blogroll