Windows11/只读挂载

来自OSSmedia

在windows系统中只读挂载磁盘

答案

https://superuser.com/questions/213005/how-to-mount-an-ntfs-partition-read-only-in-windows

拆解

调整自动挂载

关闭

mountvol.exe /N

开启

mountvol.exe /E

修改磁盘参数

  • Run diskpart
  • Enter list volume
  • Enter select volume X (where X is the correct volume number from the previous command)
  • Enter attributes volume set readonly
  • Enter detail volume and ensure the read-only bit is set
Now you can mount the volume and it will be read-only.
Note that the diskpart commands can be abbreviated, e.g. att vol, det vol.

恢复磁盘参数

前半同上

最后

att vol clear readonly