you can use this command to protect usb or hdd against virus attack or file delete by human mistake
CMD with admin right to protect the flash usb or hdd
user this command
01-diskpart
02-list disk
03-select disk (number?)
04-attributes disk set readonly
--------------------------------------------------------------------
cmd with admin right to unprotect the flash usb or hdd so you can write to usb or hdd
CMD
diskpart
01-list disk
02-select disk (number?)
03-attributes disk clear readonly
CMD with admin right to protect the flash usb or hdd
user this command
01-diskpart
02-list disk
03-select disk (number?)
04-attributes disk set readonly
--------------------------------------------------------------------
cmd with admin right to unprotect the flash usb or hdd so you can write to usb or hdd
CMD
diskpart
01-list disk
02-select disk (number?)
03-attributes disk clear readonly