Thiết lập chế độ chỉ đọc cho usb (making the flash disk write-protected)

Using DiskPart to change read-only settings

You can use the Windows DiskPart command-line utility to enable or disable read-only mode on your USB flash drive.

  1. Press Windows key+R to open the Run box. Type diskpart and press Enter.
Run diskpart from the Windows run box.
  1. If you receive a User Account Control prompt asking for permission to continue, click Yes.
  2. At the DISKPART> prompt, type list disk and press Enter

Using Windows diskpart to list disks

Use the disk size to determine which one is your USB flash drive. In this example, we know that Disk 1 is our USB flash drive because its size is 14 GB.

  1. Select your USB flash drive with the select disk command. In this example, we want to work with disk 1, so the command is select disk 1.
Using Windows DiskPart to select disk
  1. You can list the attributes of the disk with the command attributes disk.
  1. To clear the read-only attribute (making the disk writable), use the command attributes disk clear readonly.
Using Windows DiskPart to clear the read-only attribute

Or, to set the read-only attribute (making the flash disk write-protected), use the command attributes disk set readonly.

Using Windows DiskPart to set the read-only attribute

When you are finished, type exit to quit the program.

Leave a comment