I was looking on how to make my USB drive read only for various reasons… (1) I have a portable USB hard drive which contains tons (Gigabits) of files which I want to share with my friends, but I’m cautious of plugging it in their computer coz of the risk of viral infection; (2) I have my forensic/security tool on my portable thumb drive so I can virtually fix any infected/corrupted computer anywhere; (3) when I plug something on a USB port (from other computers), either a mobile phone or an mp3 player or a digital camera, I don’t want it to get infected by those blasted worms and trojans that are spreading around (I’m looking at you SSCVIHOST.exe and Funny UST scandal.avi.exe viruses).
There are a lot of freewares and softwares available on the Internet to secure and protect your USB drive, but I chose this method because it is much simple to do and it just fits my needs. So here is what you need to do…
- On your computer (or someone else’s computer), run Registry Editor. You can do that by opening the Run box from your Start menu and typing regedit.
- Now navigate to this path via the folder tree on the left panel.
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control - Once there, create a new Key called StorageDevicePolicies. If it is already there, then just navigate inside it.
- Now on the new key you’ve created, create a REG_DWORD value and name it WriteProtect.
- Set it to 1 to make the USB drive you plugged in read-only.
You can toggle it to 0 (zero) to make it write-enable. Note that this works (tested?) only on Windows XP Service Pack 2 (or SP3).
Now if you are cautious on plugging in your USB device in your friends computer, then just do this method on their machine, provided that they are using Windows XP SP2. If their machine is already infected (or locked by an admin) and the Registry Editor doesn’t open, then follow step 3 on my post regarding removal of the SSCVIHOST.exe worm.
Oh and if you did this on another computer besides yours, remember to switch the value back to 0 (zero) so that it reverts to its default settings.
This hack is also good for locking USB drives in the workplace. Those who wants to prevent possible data theft from the office. Or just simply another security method to prevent the spread or worms and trojans.
And for simplicity sake… here are two files that will make it easier for you to change the values at the registry. Just right-click, and save file target as, to save the file on your computer.
USB-drive-read-only-off.reg
USB-drive-read-only-on.reg
These are just registry files, if you have doubts what this file will do to your registry, I recommend opening it on your notepad to see its contents.
To use it, just download, double click the file and hit Ok to merge it into your registry.
Popularity: 7% [?]
