Make Pen Drive Write Protected

by Rohit Khurana on February 7, 2009



One reader mailed us asking how can he make his portable USB drive write protected so no data can be deleted or added on the pen drive, this is what he said in his mail

I want to make my drive write protected on every computer where I connect my drive


Portable drives or cards can be write protected by two ways either by physical lock provided on some of the pen drives, but locking the drive with physical lock is not a good way as any one can move the physical lock and make your drive writable.


Make Drive Write Protected With Physical Lock



Second method to make the drive write protected involves a registry hack which actually is computer dependent not the drive as it deals with registry.



Note: With this registry hack you will actually make all the removable drives connected to your computer write protected, as this registry hack instructs windows to make any removable storage device write protected.


Write Protect Instructions


Download writeprotect.bat in a zip package from here and extract the files on pen drive and double click writeprotect.bat to make your drive write protected. You will need to eject your pen drive once after launching the batch file to make your drive write protected on the computer.


Disable Write Protect Instructions


Download disablewriteprotect.bat in a zip package from here (this package is same as bove, download any of these two) and extract the files on the pen drive and double click disablewriteprotect.bat to disable write protection on your pen drive. You will need to eject your pen drive once after launching the batch file to disable write protection.


Note: I have tested these batch files on Windows XP and it should also work on windows vista too.

If you like this article or this article helped you, you can +1 to recommend this article on google plus.

You can follow us on Twitter or join our Facebook Fan Page. If you have a question to ask us, submit your question at Answers By Trouble Fixers.

Looking for something else? Search here :

{ 23 comments… read them below or add one }

jrharshath February 7, 2009 at 12:49 pm

This registry hack method doesn’t really mean write protecting you know..

Thats just for windoze! How can you stop the linux guys?

Mayur February 8, 2009 at 4:34 am

Wow its a miracle 😀
I was thinking of making this post yesterday but couldn’t found any way to it.

Mayur February 8, 2009 at 5:50 am

Please tell if this trick makes the pendrive write-protected on every PC ? do we require to run any commands afterwards.
if not then its like thumbscrew only.

drew May 6, 2009 at 11:03 pm

thumbscrew is good but it does not provent some one from coming and simply turning it off. is there a program that i can put on the usb and make it write protected no matter what pc i go to??????

Gauarv August 19, 2009 at 1:17 am

Doing a great job dude

manish February 24, 2010 at 12:32 pm

I want to make my computer drives (other than active) as read only. So that no body can change the content. Like CD any body can read the content but can’t write on it. Also it should be copy protected, so that my data will remain secure.

Gopal March 11, 2010 at 6:19 am

Like most people, I hate plugging in my usb pen drive into some cybercafe and have hordes of viruses invade it within a second. The pen drive is under my physical control and I just want to make it “read only” no matter which computer I plug it into. Usually, I will take material on my pendrive so that I can print it in cybercafes.

Believe it or not, I had an old pen drive that came with a physical R/W protect switch (it was really so convenient to use it in cybercafes).

I still haven’t found a good (and free) protection solution for these newer pen drives (for some reason, manufacturers have taken a retrograde step by removing this physical switch from pen drives).

Arun May 8, 2010 at 3:11 pm

We can place Autorun.inf file in the USB Drive
1 Open Notepad and type the following:


2 Save the Notepad document as ‘Autorun.inf’ in the USB Drive

and also unzip the files from the zip package from here.

When USB plugs in the Drive will automatically becomes read only. Double click disablewriteprotect.bat to disable write protection on your pen drive.

Thanks a lot Rohit!! for the bat files.

Web Talk June 1, 2010 at 4:05 pm

Nice article ! I used the bat file and it works pretty smooth!

vikrant June 2, 2010 at 1:11 pm

It’s not helpfull for windows 7

smile91 June 24, 2010 at 2:10 pm

i just want to know the password for writeprotect.bat
i have download that file when i want to extract this file into my pendrive its shows enter the password the file writeprotect.bat.

Rohit June 24, 2010 at 3:26 pm

its not password protected

Max September 26, 2010 at 3:52 am

Guys You all are just Rocking good solution


jeet December 30, 2010 at 1:43 pm

it’s really great………!!!!!!!!!!
plz send me more intresting tricks….

Arun February 8, 2011 at 6:55 am

I would like to make the pen drive not in the system..
As soon as we connect virus will come into it…

Works good……. but my need is different

Goutam July 7, 2011 at 11:11 am

zip file not extracting in the pendrive what to do?

sid September 1, 2011 at 6:19 pm

i got a good solution. thnx

shomrat October 17, 2011 at 11:23 am

thank you,that was very very useful for me..

Nikhil BN November 23, 2011 at 8:46 pm

superb!! it worked for me .. thanks a lot

soft mat December 14, 2011 at 12:02 am

How to make it work on windows 7?

marco April 1, 2012 at 4:28 am

Why not bying one of these and an SD lockable card?

I think it should work

lijo April 16, 2012 at 6:12 pm

i tried writeprotect.bat on my pendrive,bt now i cant format it..!
what shall i do to aply disable write protect on it.

Leave a Comment

Previous post:

Next post:

© TroubleFixers – All about fixing computer troubles2007-2017 . All Rights Reserved.