Make USB Drives Read Only

When you put your USB flash drive in a pc infected with virus, the virus gets attached to your pen drive and then it infects all computers where it is used. But sometimes we are forced to use pen drive in such pc. So is there any way to prevent virus getting infected in a pen drive ? If your pen drive has a "make read only" switch, then you need to just make it read only before inserting it into a suspected pc. But nowadays most pendrives do not have such "make read only" switch, so the following solution may be handy.

1. The following method will work for Windows XP and Vista. You need to have admin privileges for this to work because it involves writing into common area in registry.
Download this zip : (1kb)
There are two files inside this zip DisableUSBWrite.reg and EnableUSBWrite.reg . Extract this zip and double click DisableUSBWrite.reg before you insert the flash drive into the USB drive. You will be prompted with a confirmation before writing to registry. Once you get the confirmation message, now you can insert the pen drive into USB drive. Just to make sure this worked, try creating a New folder inside the flash drive, you have to get the "Media is write protected" message.
Once you remove the pen drive you should change back the USB drive into write mode. For this double click the EnableUSBWrite.reg. After confirmation ther registry is changed to make the USB drive into write mode.
2.When you own the computer
This is easy. All you have to do is prevent write access on your computer’s USB ports. This can be easily done with a registry key.
Open Registry Editor and navigate to the following registry key:
Create a new DWORD under this key and name it WriteProtect. Give it a value of 1.
The USB ports on your computer are now read only. To make them capable of writing data again, change the value of the WriteProtect key to 0.
Alternatively, you can use programs like Thumbscrew and USB Disks Access Manager
Manager that lets you toggle the WriteProtect mode quickly without opening the Registry Editor.
When you own the USB drive
Some USB drives have physical write-protect switches on the body of the drive similar to the ones found on floppy disks. You throw the switch to the read-only position and nothing can be written to the drive. But these drives are hard to come by in stores and even online.
The next viable solution is a software called UsbDummyProtect . This utility creates a dummy file that takes up all free space available on the drive. With every byte of free space gone there is no room for further data to be written to the drive, essentially turning it into a read-only drive. That’s some innovation!

Just copy the executable file of USBDummyProtect to the USB flash drive and run the tool. A dummy.file will be created and the drive will show 0 bytes remaining. You can now plug this drive on any infected PC and stay safe. To remove the dummy.file, simply delete it and the space will be recovered. If your flash drive is formatted in FAT32 and has more than 4GB of free space, USBDummyProtect wouldn’t work because of the limitation of the FAT specification that prevents creation of file larger than 4GB. So use NTFS for drives larger than 4GB.
Next Post »
Thanks for your comment