Enable "the disk is write protected” to prevent the USB device is being formatted. One good thing is that the user can still able to access, reading and copying these files as well.
#Diskpart #CMD #WindowsOS #Write_Protection #USB_Devices #Disk_ is_ Write_Protected
In the Diskpart prompt, you can type
Enable "the disk is write protected”
attributes disk set readonly
Disable "the disk is write protected”
attributes disk clear readonly