DIY Edit the registry

If you prefer to edit the registry by yourself, it’s pretty easy and only involves creating and editing a single key value.

1. Go to Start -> Run -> Type regedit and hit Enter or click on the OK button. For Vista and 7 go to Start -> type regedit into the search box, hold Ctrl+Shift and press Enter. Ctrl+Shift opens regedit as Administrator.

2. Browse to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control

Look for a key in Control called StorageDevicePolicies. If you have a key with that name go to step 4. If not, follow step 3.

3. You need to create a new key called StorageDevicePolicies. Right click on Control, select New -> Key and type in StorageDevicePolicies. Make sure not to include any spaces before or after.

4. Right click on the StorageDevicePolicies key and select New -> DWORD Value, or DWORD (32-bit) Value for 64-bit operating systems, and call it WriteProtect. Double click on WriteProtect and set the value from 0 to 1.

This will prevent users from writing to USB drives with the message “The media is write protected”.

The procedure to allow writing again to USB storage devices is simply setting the Write Protect value back to 0. To avoid any potential issues it’s best to perform this procedure while you don’t have a USB storage device plugged in. Although I simply unplugged my USB stick and reinserted it for the registry change to take effect, it might avoid any other problems that might occur.

The good thing about this is you don’t need to restart, I’ve been able to test this method several times without rebooting either XP or Windows 7 once. This is confirmed to work perfectly fine on Windows 7 32-bit and 64-bit.

If you want to use a piece of software which can completely disable write access on the USB stick meaning it can be write protected on any PC, you might like to have a look at USB Disk Manager. Another option is to fill the USB stick up with dummy data meaning writing to it is impossible.