You can set the read-only attribute to a specific partition of a hard disk. For this, you have to use the same command line utility, Diskpart. The following instructions will help you with this.
Windows comes with a built tool— Disk Management —that offers a complete solution to manage hard disks on the computer. You can use it to shrink volume, increase volume or portion size ...
A partition is a designated part of a hard drive that acts like a separate logical unit. It allows for data organization, installing different operating systems, and better disk space management.