Fix: An Error Occurred While Attempting to Create the Directory on Windows 11

Assign yourself administrative privileges to gain access

Reading time icon 5 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

Key notes

  • An error when attempting to create a directory can occur due to insufficient disk space, so try a Disk Cleanup first.
  • Running a local account may also play a part, so ensure you have sufficient administrative privileges before installing any programs.
  • For this and more solutions to this error, keep reading this article.

When installing programs on your Windows 11 PC and you run into an error occured while attempting to create the directory message, your system files may be corrupt.

There is a chance that installing what you want will work perfectly, but it doesn’t always apply to all cases. If you’re unfortunate enough to end up with this issue, there is a way to get rid of this error.

What is Error 1317: An error occurred while attempting to create the directory on Windows 11?

This is an error that can happen if you are trying to install a program because your system may not have enough disk space to create the directory. Other common causes include:

How do I fix an error occurred while attempting to create the directory?

Try the following basic workarounds before you attempt any advanced troubleshooting:

1. Disable your antivirus temporarily 

  1. Hit the Start menu icon, type Windows Security in the search bar, and click Open.
  2. Click on Firewall & network protection, then select Public network.league of legends black screen after champion select
  3. Locate Microsoft Defender Firewall and toggle the off button.turning off Microsoft Defender Firewall Windows

2. Run the DISM and SFC scans

  1. Hit the Start Menu icon, type cmd in the search bar, and click Run as administrator.cmd-run-admin-w11 unexpected kernel mode trap windows 11
  2. Type the following commands and press Enter after each one:DISM.exe /Online /Cleanup-Image /Restorehealth sfc /scannow

You can always rely on specialized repair tools to do this for you. This software will scan and then replace any broken system files with just a few clicks.

3. Run the Program Install and Uninstall troubleshooter

  1. Download the Program Install and Uninstall troubleshooter and install it.
  2. Open it and click on Next.
  3. You’ll be asked whether you have a problem installing or uninstalling a program. Select one option.
  4. Next, you’ll be asked to select the program that is not installing. Pick the problematic program from the list.
  5. The troubleshooter will start scanning for problems.
  6. Once it completes, you’ll be presented with two options. Pick either and wait for the troubleshooter to recommend fixes.

4. Adjust folder permissions

  1. Right-click the folder you want to make changes to and select Properties.
    properties you require permission from everyone to make changes to this file
  2. Click the Security tab at the top.
  3. Now, select your user account under the Group or user names section.
  4. Next, click the Edit button.
    edit security
  5. Select your user account again under the Group or user names section.
  6. Check the Allow box for all the entries there.
  7. Finally, click the Apply button, followed by OK.
    allow ok

Allowing permissions can also help address similar issues like the installer unable to create a temporary directory.

5. Disable controlled folder access

  1. Hit the Windows key, type Windows Security in the search bar, and click Open.
  2. Navigate to Virus & threat protection.
  3. Scroll down and select Manage ransomware protection.
  4. Locate the Controlled folder access option and toggle it off.

Controlled folder access is a feature that protects your files from malware. It does this by monitoring the folders where apps can write files and create new ones. You can disable it temporarily and install the problematic app, then switch it back on for the safety of your system.

6. Create a new user profile 

  1. Press Windows + R to launch the Run console, enter netplwiz in the text field, and click OK.
  2. Click Add in the User Accounts window.
  3. Select Sign in without a Microsoft account (not recommended).
  4. Click on Local account button.
  5. Enter a username and password (optional) for the new user account, and a hint, in case you set a password. Once done, click on Next.
  6. Click on Finish to create the Local account.

If the error 1317: An error occurred while attempting to create the directory goes away in this new user profile, your previous one may have been corrupted. You can take the necessary steps to repair the user profile or copy it to the new user account.

7. Perform clean boot

  1. Hit the Windows key, type msconfig, and open System Configuration.
  2. Switch to the Services tab and select Hide all Microsoft services.
  3. Click on the Disable all button, then hit the Apply button to save the changes.
  4. Go back and click on the Startup tab, select Open Task Manager then click OK.
  5. In the Startup tab of the Task Manager, Disable all the Enabled startup items.
  6. Close Task Manager and restart your PC.

In summary, access denied errors like this are mostly due to a lack of proper maintenance of your PC. Over time, the registry becomes bloated with unnecessary entries, which affect its performance.

Cleaning out your registry regularly can help optimize your PC and minimize the occurrence of such issues.

Similarly, domain users may also be locked out with the error occurred attempting to join the domain, so check out our article on how to bypass it.

If you’ve come across a similar problem, we’d love to hear your alternative fixes if available. Drop us a comment down below.

More about the topics: Windows 11

User forum

0 messages