Script to make USB Mass Storage read only

March 10, 2008 by John Tran · Leave a Comment 

The following script gives users read only access to USB Mass Storage devices. This is handy if you want to prevent users from copying data to any USB Storage device.

Set WshShell = WScript.CreateObject(“WScript.Shell”)

WshShell. RegWrite “HKLM\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies\”, “0″, “REG_DWORD”
WshShell. RegWrite “HKLM\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies\WriteProtect”, “1″, “REG_DWORD”

WScript.Quit ‘ Tells the script to stop and exit.

You will need to save this as a .vbs file and then add it to the startup script in GPO.