How to Make a Volume Read-Only
- 1). Click "Start," type "cmd" in the search bar and press "Enter." Type "diskpart" at the command line.
- 2). Type "list volume" to get a list of the volumes on your system. Each volume has a number and drive letter associated with it; the drive letter helps you determine the volume you want to set as read-only.
- 3). Type "select volume=x" -- without quotes -- where "x" is the number in the volume number list. For example, to set your "D:" drive as read-only, and the "D:" drive is volume "3" in the list, type "select volume=3."
- 4). Type "attributes volume set readonly" to set the selected volume to read-only status. Any attempt to write data to the volume will cause a "The disk is write-protected" error.
Source...