When trying to install software in Windows 10/11, you may fail with the error message saying: an error occurred while attempting to create the directory. Here, to help you solve the issue, this post from MiniTool Partition Wizard provides multiple troubleshooting fixes. You can take a look.

The “an error occurred while attempting to create the directory” issue is a common issue that prevents you from installing a program in Windows 10/11. Sometimes, you may receive this issue with an error 1317. This issue can occur due to various reasons, like a corrupted installation file, lack of administrative privileges, etc.

To get rid of the issue effectively, you can try the following methods. It’s worth noting that you should make sure you have sufficient space for the specific installation. If not, you’d better run a disk cleanup to free up enough disk space. Alternatively, you can also use MiniTool Partition Wizard to release disk space.

MiniTool Partition Wizard FreeClick to Download100%Clean & Safe

It’s a useful space analyzer that enables you to scan the hard drive for a better view of the disk space usage and delete the unwanted large files. Besides, it also allows you to create/format/resize/clone hard drive, convert MBR to GPT without data loss, recover data from hard drive, and more.

Method 1: Run the Program Install and Uninstall Troubleshooter

The Program Install and Uninstall troubleshooter can help repair issues with installing and uninstalling programs. So, when you run into the “Windows 10 an error occurred while attempting to create the directory” issue, you can try to fix it with the troubleshooter.

Step 1: Download the needed troubleshooter from the official website.

Step 2: After that, double-click the downloaded file to open it. Then click to continue.

Step 3: Click Next in the next window. Then the troubleshooter will detect possible problems and give you instructions to fix them. Simply follow the given instructions to see if you can repair the error.

Run the Program Install and Uninstall troubleshooter

Method 2: Disable the Controlled Folder Access

Disabling the Controlled folder access may also help you fix the error 1317: an error occurred while attempting to create the directory. You can learn how to execute the operation from this post: How to Enable/Disable Controlled Folder Access in Windows 11/10.

Method 3: Grant Your Account Full Control

If you don’t have enough administrative rights to run the program installation, the “an error occurred while attempting to create the directory” issue may happen. To fix it, you may need to give full control to your account in the specific folder. Here’s how to do this.

Step 1: Right-click the program folder showing you the error message. Then select Properties.

Step 2: Go to the Security tab and then click the Edit button.

Step 3: In the next window, select your user account from the list of Group or user names. Then tick the Allow checkbox of Full control.

Change the folder permissions

Step 4: Once done, click Apply > OK to save the changes.

Method 4: Temporarily Disable the Antivirus

In some cases, the antivirus programs on your computer may interfere with the program installation, leading to error 1317. Therefore, you can also try temporarily disabling the antivirus in your system to fix the issue.

Method 5: Run SFC and DISM Scans

The “Windows 10 an error occurred while attempting to create the directory” issue may show up due to corrupted or missing system files as well. In this case, it’s recommended that you fix it with SFC and DISM utilities. To do this, follow the steps below.

Step 1: Press Windows + R to open the Run dialog.

Step 2: Type cmd in the box and then press Ctrl + Shift + Enter to run Command Prompt as an administrator.

Step 3: In the elevated Command Prompt, type sfc /scannow and press Enter.


Step 4: After the process completes, restart your computer and run Command Prompt with administrative rights again.

Step 5: Type DISM /Online /Cleanup-Image /Restorehealth and press Enter.

Step 6: Wait until the scan ends. Then restart your PC to see if the error disappears.

Method 6: Try the Program Installation Again

If something wrong happens during the program installation, you may also run into the error 1317. To troubleshoot it, you can try deleting the installation file and then downloading it back. Moreover, in case of unexpected software conflicts, you can try performing the re-installation in the clean boot state to see if it can succeed.

This post explores how to fix the “Windows 10/11 an error occurred while attempting to create the directory” issue in detail. Hope you can easily solve your problem with the above methods. If you have any other great solutions to this issue, please share them with us in our comment area below.

  • linkedin
  • reddit