'Disable Writing to USB Storage Devices 'This script will prevent Windows XP from writing to block storage devices via USB. 'DisableUSBWrite.vbs '© Robert Dunham - 7/10/2007 'Downloaded from http://www.nilpo.com/pub/scripts/ 'More Information at http://www.nilpo.com/2007/07/windows-xp/disable-writing-to-block-storage-devices-on-usb-buses/ On Error Resume Next message = "This script will prevent Windows XP from writing to block storage devices via USB." + vbcr + vbcr message = message + "Would you like to continue applying this tweak?" result = msgBox(message, _ VBYesNo + vbQuestion + vbDefaultButton2 + vbSystemModal, _ "Disable AU Reminder") If result = vbCancel Then WScript.Quit End If Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.RegWrite "HKLM\System\CurrentControlSet\Control\StorageDevicePolicies\WriteProtect", 1, "REG_DWORD" message = "Script provided by Nilpo.com" + vbcr + vbcr message = message + "Please reboot your computer for changes to take effect." MsgBox message, vbOKOnly, "Finished" Set WshShell = Nothing Wscript.Quit