The Command Prompt app is a built-in Windows tool which allows you to execute commands and perform advanced admin functions. Use of the CHKDSK command is a very useful utility for scanning the device for any errors and detecting bad sectors on a drive. While it usually works as expected, many users have run into the error message which says “Windows cannot run disk checking on this volume because it is write protected.” If you are among them, use the tricks below to troubleshoot the problem on your laptop.
Several factors can lead to such annoying errors while running the CHKDSK command. The problem can be due to a corrupted drive or, as the error suggests, a protected disk. Before we explore advanced tricks, let’s go through several basic steps first.
Related
How to repair Windows 11
The operating system is the most important software on your PC, so it’s important to fix any OS-related errors as soon as you detect them.
Why Windows may run into an error while checking disk
CHKDSK has an essential command to fix the master file table (MFT), check the disk for file system errors, detect misaligned time stamps, and review file size information about specific files. You do need admin privileges to run the command. If the system is not running disk checking on a volume, it could be due to the following factors:
- Attribute of the drive is selected as Read-only
- Incorrect Windows Registry key value
- The USB drive has a physical Read-only switch which is enabled
- A damaged file system due to corrupt files and hardware errors
- An active write protection on a disk
In order to help address the issue, I will go over the steps you can take to troubleshoot the error, starting with the easiest solution first (hoping that it may be the one that works for you)!
1. Remove write protection on the disk
In this case, you can simply disable write protection on the disk and try again.
- Run Command Prompt as administrator.
- Type the command below and hit the enter button.
diskpart
- Type the following command and press the enter button. Glance over the list of attached disks.
list disk
- Enter the command below and press enter. Replace 0 with the associated number with which your drive is listed.
select disk 0
- Paste the following command and press Enter.
attributes disk clear readonly
This should remove write protection on a disk. You should now be able to successfully run the disk checking utility.
2. Remove disk errors
You can remove disk errors and corruption by running command-line CHKDSK parameters.
- Press the Windows key, search for Command Prompt, and run it as administrator.
- Type the following command and press the enter button.
chkdsk C:/f/r/x
You can replace C with the drive letter of your choice. In the command above, /f scans the disk and attempts to repair errors, /r detects bad sectors and tries to recover information, and /x dismounts the disk and invalidates file handles if needed.
3. Scan your drive
You can use drive properties to check for file system errors. Simply follow these steps:
- Press the Windows + E keys to open File Explorer.
- Right-click on a drive and select Properties.
- Slide to the Tools menu and select Check under Error checking.
- Scan the drive from the following menu and learn more about the issue to resolve it.
4. Tweak read-only settings in Registry Editor
If the tricks above didn’t work to remove write protection, use the registry editor to get the job done.
- Press Windows + R keys to open the Run menu. Type Regedit and hit enter.
- Navigate through the path below.
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControl
- Right-click on a blank area and select New> Key. Rename the key as StorageDevicePolicies.
- Select it. Right-click on the right panel and select DWORD (32-bit).
- Name it WriteProtect and right-click on it to select Modify. Set the value to 0.
Restart your computer to save changes, then see if this helped resolve the issue.
5. Use Disk Management to format volume
When none of these tricks work, it’s time to format the volume via the Disk Management tool. However, please be aware that this will remove all files and folders from the drive (i.e. wipe your computer).
- Right-click on the Windows key and open the Disk Management tool.
- Select the target drive and right-click on it. Click Format from the context menu.
- Enter volume label, select file system, and allocation unit size, and click OK.
A warning message will show up. Confirm your decision and let it run the process.
Does your PC or laptop drive still act up after reformatting the disk? You are probably dealing with a hardware issue then. It’s time to seek help from a professional or get a replacement.
Run the CHKDSK utility without any errors
CHKDSK utility comes in handy when checking and fixing disks for errors. When the system fails to execute the command, it can be confusing. Before you format the drive and lose access to all your files, try the other tricks above to fix the problem. Apart from CHKDSK, there are also other useful Windows command line prompts. Check our dedicated guide to learn more.