There is a registry hack that able to disable the USB drive access to USB mass storage device such as flash drive, USB key, thumb drive, pendrive and portable hard disk while keeping the USB hardware device such as webcam, mouse, keyboard, printer and scanner connected to USB ports working as usual. However, the hack disable the USB access to disk drive completely. User cannot copy data to the USB disk storage, nor able to read any files and documents from the USB drive.
For user who just want to disable write access to the external removable USB mass storage disk drive, there is another registry hack of WriteProtect in StorageDevicePolicies or Deny_Write in RemovableStorageDevices registry key that able to restrict Windows system from writing to the USB disk drive, and hence effectively user to copy any sensitive or private data from the PC to USB key stick. The trick works in a similar way to write-protect feature used in floppy disk and backup tape which make the disk read-only, only that in this case, it’s system wide implementation that block any writing and recording of data to USB mass storage device.
To disable writing access to USB drives and make all USB drives has only read-only access in Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008 (R2), Windows Server 2012 (R2), Windows Server 2016 or later, follow these steps :
- Run Registry Editor (regedit).
- Navigate to one of the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\ (To deny write access for all users computer-wide)
HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\ (To deny write access for currently logged in user)
- Create a New Key named as RemovableStorageDevices.
- Highlight RemovableStorageDevices, and then create a New Key named as {53f5630d-b6bf-11d0-94f2-00a0c91efb8b}.
- Highlight {53f5630d-b6bf-11d0-94f2-00a0c91efb8b}, and then create a New DWORD (32-bit) Value named as Deny_Write.
- Double click on Deny_Write, and set its value data to 1.
To disable writing access to USB drives and make all USB drives has only read-only access in Windows XP and Windows Server 2003, follow these steps :
- Run Registry Editor (regedit).
- Navigate to the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
- 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.
If you own professional edition of Windows or Windows Server operating system, you can also use Local Group Policy Editor to apply the deny access to removable storage devices policy.
- Run Local Group Policy Editor (GPedit.msc).
- Navigate to one of the following branch in the left pane:
User Configuration -> Administrative Templates -> System -> Removable Storage Access (To deny write access for all users computer-wide)
​
User Configuration -> Administrative Templates -> System -> Removable Storage Access (To deny write access for currently logged in user)
​ - To deny and disable write access for removable hard disk drives or USB flash drives, right click on Removable Disks: Deny write access in the right pane and select Properties.
- Select the radio button for Enabled and click on OK or Apply.
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 error message:
The disk is write protected.
The media is write-protected.
Remove the write protection or use another disk.
Destination Folder Access Denied
You need permission to perform this action
For Group Policy, set Removable Disks: Deny write access policy to either Disabled or Not Configured.
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.
Download DisableWriteToUSB.reg (no longer available)
Download EnableWriteToUSB.reg (no longer available)