There are several ways to enable or disable write-protection of your USB flash drive. There are three solutions available and depend on your device:

# Some devices have a physical switch you can toggle the USB write protection on or off.

# You can make a Windows registry edit so the operating system will flag the device to be read-only. The OS will block the write command to the device.

# You can get a solution which sets the write protection on the firmware of the device itself. This last solution is the true solution to write protection, because the setting follows the device where ever it goes, and is write protected in anything it is connected to.

SWITCH:

Some USB flash drives have a write-protection switch on the side or bottom. The write-protection switch is useful for keeping the contents of your drive safe from malware when you need to view them on a public computer. If your device has this switch, move it to the "Lock" position. This action effectively sets all files, and the device itself, to read-only mode.

WINDOWS REGISTRY EDIT:

Type "regedit" in the Windows search box and click ENTER.
The Registry Editor will pop up. Navigate to the following location:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\StorageDevicePolicies]

Edit the value for StorageDevicePolices to:

“WriteProtect”=dword:00000001

You can now close the Registry Editor.

FIRMWARE DEVICE SETTING

This is really the golden solution. Chances are, if you've found this post you are trying to make a USB write protected so the USB is read-only in everything it is connected to.

The only way to make the USB write protected for everything is to have the USB configured that way. The only way to do this is tap into the firmware of the controller on the device itself. You can't do this by hacking... it's impossible to hack machine code (the code inside a chip) so you need to get commands specific to the chip to make the write protection setting.

For this golden solution, we suggest using the Lock License drives by Nexcopy. They give you several ways to write protect the drive. You can use a GUI version (Graphical User Interface) to lock or unlock the USB flash drive write protection or you can use a more programmatic way by their command line tool. This means you can embed the locking or unlocking into another program.

For example, you have software on a write protected flash drive because you cannot have the software change, be manipulated or hacked. However, you still need to make updates to the software throughout the year. The Lock License drive gives you the ability to write a solution to automatically unlock the drive and remove the write protection, update the drive contents with ne

The only way to make the USB write protected for everything is to have the USB configured that way. The only way to do this is tap into the firmware of the controller on the device itself. You can't do this by hacking... it's impossible to hack machine code (the code inside a chip) so you need to get commands specific to the chip to make the write protection setting.

For this golden solution, we suggest using the Lock License drives by Nexcopy. They give you several ways to write protect the drive. You can use a GUI version (Graphical User Interface) to lock or unlock the USB flash drive write protection or you can use a more programmatic way by their command line tool. This means you can embed the locking or unlocking into another program.

For example, you have software on a write protected flash drive because you cannot have the software change, be manipulated or hacked. However, you still need to make updates to the software throughout the year. The Lock License drive gives you the ability to write a solution to automatically unlock the drive and remove the write protection, update the drive contents with new software, then re-lock the drive so it becomes read-only once again.


All of the above solutions are a great way to set USB write protection for a flash drive. Some solutions are better than others. Everyone has different needs so maybe one of the above is best suited for your needs.