To disable writing access to USB drives and make all USB drives has only read-only access, follow these steps:
- Run Registry Editor (regedit).
- Navigate to the following registry key:
- Create a New Key named as StorageDevicePolicies.
- Highlight StorageDevicePolicies, and then create a New DWORD (32-bit) Value named as WriteProtect.
- Double click on WriteProtect, and set its value data to 1.
Once set, all users on the computer is now blocked and prevented from
copying, transferring or writing any files, documents and data to the
USB disk drives, without the need to restart or reboot computer. Any
attempt to download or copy files to USB drive will return the following
The disk is write protected.
The media is write-protected.
Remove the write protection or use another disk.
To revert and remove the blocked write access to USB drivers, just
delete the StorageDevicePolicies registry key, or delete the
WriteProtect registry entry, or change the value data for WriteProtect
For user who doesn't want to manually editing the registry, simply
download the following registry registration files to enable or disable
the write protection (block writing attempt) to USB removable drive.
Double click the .reg file unpacked from the .zip archive to merge the
registry key entries.
The trick works in Windows XP SP2 and SP3, Windows Vista, Windows Server 2003 and 2008.