Monday, December 31, 2007

Enable/Disable Write Protect USB flash drive

There is a simple solution for this in the case of windows.
Just do a "regedit" for StorageDevicePolicies key.
. Get into the Registry - Press Start -> Run, enter regedit, press Ok
. Click on My Computer. Then press File -> Export, give some file name to backup the registry. Just incase you ever need to rollback.
. Navigate to
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/StorageDevicePolicies
. In the right pane select "writeprotect"
. RESET the value to '0'

or save as this code "filename.reg"

----------------------cut here to enable----------------------------
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies]
"WriteProtect"=dword:00000001
-----------------------cut here-------------------------------------

and

----------------------cut here to Disable----------------------------
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies]
"WriteProtect"=dword:00000000
-----------------------cut here-------------------------------------

Repeat the same for ControlSet001 and ControlSet002 incase they exist.

Now plug in your USB drives and it should work. Else just reboot the machine and try. This has worked on most of the machines on which I tried.
Enjoy!!!

No comments: