How to Set or Remove Volume Read-Only or Write-Protect on Windows 11/10/8/7?

How to set a volume read-only? How can I prevent a volume from accidentally formatting? This risewindows article will answer all these questions. We will show you the steps to set or remove a particular volume read-only mode on Windows 11/10/8/7 without third-party software.

Why do you need to set a Volume as Read-Only Mode?

It is better to make the volume or drive read-only where you have stored essential data if you share your PC, external hard drive, or USB flash drive with your friend or colleagues. You or someone else will be unable to delete it or format it once the read-only mode is set on any disk or volume. You can protect your data by making your storage device read-only, and even a virus will not affect them. Moreover, anyone can open and read the file available on the hard drive, USB drive, or partition.

In this risewindows article, we will learn the following topics:-

  1. How to Set a Volume Read-Only or Write Protect in Windows 11/10/8/7?
  2. How to Remove Read-Only or Write Protect Mode from a Volume in Windows 11/10/8/7?

How to Set a Volume Read-Only or Write-Protect in Windows 11/10/8/7?

You need to follow the below-given steps to set a volume as read-only on Windows PC:-

Step 1. Now, open the Command Prompt with administrative privileges.

cmd-in-Run-boxTo open the command prompt with elevated or administrative rights, press Windows Logo + R keys together to open the “Run” dialog box. Then type cmd and press Ctrl + Shift + Enter to run the command prompt as an administrator.

Next, click on the Yes button to continue if User Account Control (UAC) dialog box appears.

Command-Prompt-UACStep 2. On the Command Prompt window that opens, type the following and press Enter from the keyboard to execute the command:-

diskpart

diskpartStep 3. Then, on the DISKPART prompt, type the below-mentioned command and press Enter from the keyboard to execute it:-

list volume

list-volumeWhen you execute the above command, it will list all the internal and external volumes attached to your PC.

Step 4. Note down the volume number which you want to write-protection or read-only. Now, type the following command and press Enter from the keyboard to execute it:-

select volume volume-number

Note: In the above command, replace the “volume-number” with your volume number, which you want to make write protect or read-only. For instance, we will make write protect or read-only to Volume 2. Hence, my command will be “select volume 2.”

select-volumeStep 5. Finally, type the following and press Enter from the keyboard to make it write protect or read-only:-

attributes volume set readonly

attributes-volume-set-readonlyStep 6. You will see a message on the DISKPART, “Volume attributes set successfully.”

You or someone will not be able to delete or modify any file on that volume once you complete the steps mentioned above. Even you can not format them. You will get the error “The disk is write-protected.”

Write-Protected-DiskHow to Remove Read-Only or Write Protect Mode from a Volume on Windows 11/10/8/7?

You need to follow the below-given steps to remove read-only or write-protection from a volume on Windows PC:-

Step 1. Now, open the Command Prompt as administrative privileges.

cmd-in-Run-boxTo open the command prompt with elevated or administrative rights, press Windows Logo + R keys together to open the “Run” dialog box. Then type cmd and press Ctrl + Shift + Enter to run the command prompt as an administrator.

Next, click on the Yes button to continue if User Account Control (UAC) dialog box appears.

Command-Prompt-UACStep 2. On the Command Prompt window that opens, type the following and press Enter from the keyboard to execute the command:-

diskpart

diskpartStep 3. Then, on the DISKPART prompt, type the below-mentioned command and press Enter from the keyboard to execute it:-

list volume

list-volumeWhen you execute the above command, it will list all the internal and external volumes attached to your PC.

Note: You can not protect external volumes using these commands. However, it is possible to remove read-only or write-protection using the disk command.

Step 4. Note down the volume number which you want to write-protection or read-only. Now, type the following command and press Enter from the keyboard to execute it:-

select volume volume-number

Note: In the above command, replace the “volume-number” with your volume number, which you want to make write protect or read-only. For instance, we will remove write-protection or read-only to Volume 2. Hence, my command will be “select volume 2.”

select-volumeStep 5. Finally, type the following and press Enter from the keyboard to remove it from write-protection or read-only:-

attributes volume clear readonly

The read-only or write-protection mode is removed from the selected volume when you complete the steps mentioned above. Now you can edit or format the volume if you need.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: