EaseUS Partition Master

Easily manage your disk partitions with this trusted software.

  • Convert MBR to GPT for Windows 11.
  • Migrate Windows 11 to New SSD in 1-Click.
  • Extend C Across Disks, Fix Low Disk Space Error.
Free Download 

Windows 11/10/8/7100% Secure

Content

Total downloads

Page content

Diskpart Has Encountered an Error Access Is Denied | How to Fix

Updated by Roxanne on Jan 21, 2022
Written by Jean
mins read

Overview of Diskpart Access Denied Issue

Some users have reported that when they try to clear a USB flash drive with the command prompt and diskpart, they failed midway clean the disk  due to the error message:

Diskpart has encountered an error: Access is denied.
See the System Event Log for more information.

When checking the System Event Log, you might see the error message: Failed to open device \\?\GLOBALROOT\Device\HarddiskVolume5. Error code: [email protected]. It means that the storage device is considered to be blocked (or write-protected), and has to be authorized.

DiskPart Has Encountered an Error

3 Ways to Fix DiskPart Access Denied

To help you get rid of the error message, we have listed 3 solutions below. You can use both the built-in tool and third-party tool to solve this problem. Choose the most appropriate one according to your needs, and try it as instructions. 

1. Run the Command Prompt as Admin

This method is suitable for storage devices that require authorization. First, you need to start a command prompt as an administrator:

Step 1. Click Start, click All Programs, and then click Accessories.
Step 2. Right-click Command prompt, and then click Run as administrator.
Step 3. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.

Run diskpart again. See if the access is denied error disappears.

2. Remove Write Protection on the Hard Disk, USB Flash Drive or Memory Card

As mentioned above, if your storage device is write-protected, you can also see the "Diskpart has encountered an error: Access is denied" error. Here are the detailed steps of how to fix the disk is write-protected.

1. Open up your start menu and click "Run"
2. Type regedit in the box.
3. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
4. Now double click the "WriteProtect" key and change the value to 0.

Registry Alternative - Write-Protection Removal Tool

If you don't consider yourself a pro-computer user and you're not familiar with command-lines, don't worry. There are graphical-based solutions to help you remove write-protection from your hard drives, USB drives, and even SD cards.

EaseUS CleanGenius is one of these tools that helps you fix aforementioned issues on your drives without knowing a thing about command-line.

Here's an easy-to-follow guide on how to use this tool to get your issues sorted:

Step 1: DOWNLOAD and install EaseUS CleanGenius (free) on your computer.

Step 2: Run EaseUS CleanGenius on your PC, select Optimization and choose the Write Protection mode.

disable write protection

Step 3: Select the device that is write-protected and click Disable to remove the protection.

Disable Write Protection from storage devices.

Have nowhere to find the specified regedit path? Move on to the final resort.

3. Download Third-Party Format Software to Get Rid of Diskpart Access Denied Problem

Why were you insisting on formatting a disk storage drive or removable storage media in the command prompt with diskpart utility? It's tricky, and not a perfect solution for ordinary Windows users. Reasons are apparent to see. As soon as diskpart encountered errors, besides access is denied, many other similar errors only make users go nut. For example, diskpart has encountered an error, the parameter is incorrect, incorrect function, etc.

Therefore, finding a diskpart alternative should be the best way to tackle the problem that prevents you from formatting a disk, performing a clean, or creating a partition. EaseUS Partition Master free is such an ideal alternative tool that provides all diskpart features for home & office users. Here are some features of this tool:

  • Format disk partitions in simple clicks.
  • Enable users to well organize hard drives to enhance system performance.
  • Migrate OS to SSD to speed up Windows.
  • Change disk style from MBR to GPT/primary to logical without data loss, and vice versa.

Download EaseUS free partition manager and follow the instruction to format partitions on your Windows computer.

Applies to: Windows 10, 8.1, 8, 7, XP, and Vista.

Free Download 

Windows 11/10/8/7100% Secure

Step 1. Launch EaseUS Partition Master, right-click the partition on your external hard drive/USB/SD card which you want to format and choose the "Format" option.

Format External Hard Drive/USB/SD Card - 1

Step 2. Assign a new partition label, file system (NTFS/FAT32/EXT2/EXT3/EXT4/exFAT), and cluster size to the selected partition, then click "OK".

Format External Hard Drive/USB/SD Card - 2

Step 3. In the Warning window, click "OK" to continue.

Format External Hard Drive/USB/SD Card - 3

Step 4. Click the "Execute Operation" button in the top-left corner to review the changes, then click "Apply" to start formatting your external hard drive/USB/SD card.

Format External Hard Drive/USB/SD Card - 4

How Can We Help You

About the Author

Updated by Roxanne

Roxanne is one of the main contributors to EaseUS and has created multiple posts on digital devices like PCs, Mobile phones, tablets, Mac, etc. She loves to share ideas with people of the same interest.

Read full bio

Written by Jean

Author Jean has been writing tech articles since she was graduated from university. She has been part of the EaseUS team for over 5 years. Her special focuses are data recovery, disk partitioning, data space optimization, data backup and Mac OS. By the way, she's an aviation fan!

Read full bio

Product Reviews

Product Reviews

TrustScore 4.7 | 49 reviews
  • I love that the changes you make with EaseUS Partition Master Free aren't immediately applied to the disks. It makes it way easier to play out what will happen after you've made all the changes. I also think the overall look and feel of EaseUS Partition Master Free makes whatever you're doing with your computer's partitions easy.

    Read More
  • Partition Master Free can Resize, Move, Merge, Migrate, and Copy disks or partitions; convert to local, change label, defragment, check and explore partition; and much more. A premium upgrade adds free tech support and the ability to resize dynamic volumes.

    Read More
  • It won't hot image your drives or align them, but since it's coupled with a partition manager, it allows you do perform many tasks at once, instead of just cloning drives. You can move partitions around, resize them, defragment, and more, along with the other tools you'd expect from a cloning tool.

    Read More

Get EaseUS Partition Master

Your best companion for disk partitioning, MBR to GPT/GPT to MBR conversion,even OS migration

Free Download 

Windows 11/10/8/7100% Secure