Disk

DiskPart has encountered an error Access is denied

DiskPart has encountered an error Access is denied

DiskPart is a useful utility when it comes to managing the disks on a computer. Even if the GUI based disk management tools on the Windows 10 operating system fail, DiskPart always tends to work. This does not mean that it cannot encounter any sorts of errors. If you see a message DiskPart has encountered an error, Access is denied, then we will show you what you need to do to fix the problem.

DiskPart has encountered an error: Access is denied

This error is caused due to a number of factors.  It could be that the Write-Protection is enabled for the drive on which the operation is being performed, or the Command Prompt terminal does not have administrator-level permissions.

We will be taking a look at the following fixes to resolve this issue:

  1. Run the Command Prompt with Administrator-level permissions.
  2. Remove Write-Protection from the drive
  3. Use third-party software to perform the operation.

1] Run Command Prompt  with Administrator level Permissions

You can also try to Run CMD as Administrator and check if you can execute the DiskPart operation without any errors.

2] Remove Write Protection from the drive

There are two methods to remove Write-protection.

The first one is using the DiskPart utility. For that, execute the following commands in an elevated command prompt

diskpart

This will initiate the Diskpart utility. Then type-

list disk

These commands will help you in either listing all the Disks connects or all the partitions on those disks formed.

From here, you will have to choose one command depending on the list command you entered.

Type in-

select disk #

Hit Enter. This will select the Disk or Partition you want to select.

Next, type in-

attribute disk clear readonly

Hit Enter. This will disable the Write Protection for the selected disk.

The second method for it by using the Registry Editor. For that, Type regedit in Windows Search box and hit Enter to open the Registry Editor.

Locate the registry key:

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies

Select and Double Click on the DWORD named as WriteProtect and set its Value Data as 0.

Restart your computer and check if this has fixed your issues.

While updating, be around the PC to interact with the prompts to complete the update.

3] Use third-party software

You can use any third-party free partition manager software like EaseUS to manage your partitions and manipulate their properties.

All the best!

Gry Open Source Ports of Commercial Game Engines
Open Source Ports of Commercial Game Engines
Free, open source and cross-platform game engine recreations can be used to play old as well as some of the fairly recent game titles. This article wi...
Gry Najlepsze gry wiersza poleceń dla systemu Linux
Najlepsze gry wiersza poleceń dla systemu Linux
Wiersz poleceń jest nie tylko twoim największym sprzymierzeńcem podczas korzystania z Linuksa - może być również źródłem rozrywki, ponieważ możesz go ...
Gry Najlepsze aplikacje do mapowania gamepada dla systemu Linux
Najlepsze aplikacje do mapowania gamepada dla systemu Linux
Jeśli lubisz grać w gry na Linuksie za pomocą gamepada zamiast typowego systemu wprowadzania klawiatury i myszy, jest kilka przydatnych aplikacji dla ...