Write protection (also called read-only) can be physical or virtual. A USB flash drive is enabled with write protection has the ability to prevent new files from being written or old files being changed. Typically, this means you can only read the data which are already stored on the USB, but you can’t delete or modify them. By using write protection, you can make ensure data is not accidentally overwritten or erased.
So here are some methods of enabling and disabling of WRITE PROTECTION
Using Command Prompt (Diskpart)
Open up the elevated command prompt (command prompt with administrator privileges)
Type diskpart and press Enter.
Type list disk and press Enter.
Note the number next to the disc you want to enable or disable write protection for. It would read like this disk 1
Now type select disk # where # is the number you noted in step abovetutorial546-dos
To enable write protection for the disk type: attributes disk set readonly
To disable write protection for the disk type: attributes disk clear readonly.
Using Physical Switch
All the modern USB drive and Memory Cards comes with switch button just like shown in the following image. You can move this button to enable and disable write protection on the USB drive simply.
Once you enable write protection for the following item, you won’t be able to write and erase anything.
Using Registry Editor
The following method works in all the editions of the Windows 10 including Home edition.
1. First, of all you need to launch the Registry Editor. For that, you need to press WIN + R hotkeys, when RUN dialog appears simply type “regedit” and click ok to launch the Registry Editor.
Alternatively, for quick access, you can also type regedit in the Start menu search bar, when you see regedit run command in the search results. Simply click to launch it.
2. After that navigate to following Registry key in the Registry Editor
3. Under Control Key, you need to create a new Subkey. For that, select Control key and make right click using the mouse and from the options click on New -> Key and name this subkey “Storage Device Policies.”
4. Under Storage Device Policies key, you need to create new 32-bit DWORD value. You need to name this entry “write protect.”
Note: In case, you’re using 64-bit Windows OS version, you still need to create 32-bit DWORD value.
5. After that, double click on the newly create “write protect” DWORD value and set its value data to 1.
6. In case, you have connected any USB device to your computer, then reconnect them.
Once you set the value data of Write Protect value to 1 and reconnect all the USB drives, the USB devices restriction effect will take place quickly. All the USB devices connected to your computer will become read-only. This security feature is so strong that once this feature is enabled, it will also remove the “New” and “Delete” options in the context menu command.
For disabling the USB Write Protection, you need to set its value data to 0 or delete the “write protect” DWORD value from the Storage Device Policies key.
So these are different possible ways to enable or disable USB write protection in the Windows 10.