Trying to install a new program/game on your Windows 11 computer, and an error message suddenly appears saying Error 1317: An error occurred while attempting to create the directory?
Primarily, users might think this error occurs due to a corrupted installation file. This is partially true but not the exact reason behind the error.
This error occurs when your Windows 11/10 computer fails to create a folder for the application you tried installing.
Restarting the computer in safe mode sometimes resolves the issue, but that’s not the ultimate solution. Read this article thoroughly to find out how you can fix the issue in no time.
How to Fix an Error Occurred while Creating Directory in Windows 11
Installing the programs in elevated mode should be the immediate solution you apply when Windows fails to create a directory file. Right-click on the program you want to install and select run as administrator. That should resolve the error: 1317 on Windows 11.
After that, make sure the .Net 3.5 framework is enabled on your computer. Go to Control Panel > Programs and Features > then click on Turn Windows features on or off from the left menu > Mark on .Net framework 3.5 and .Net framework 4.8 options.
Initially, those methods will solve the error message that appears while installing a new application/game. If they don’t, there are other solutions you can try on.
Try the following section to find out.
You may also like to read: Fix Error Cannot Delete Folder
Here are the methods to solve an error that occurred while trying to create a file in the destination directory:
1. Create a New Administrator Account in Windows 11
Sometimes, the existing administrative account may get compromised by viruses and corrupted files. Creating a new administrative account should help you with the issue. Try further steps from down below and check if that resolves your issue.
Here are the steps to create a new administrator account to solve the Directory error in Windows 11:
- Press Windows + I key to open the Windows Settings.
- Move to Accounts > Family & Other Users.
- Click on Add Account in the add other user A new window will pop up.
- Select I don’t have this person’s sign-in information from there.
- Select add a user without a Microsoft Account from the following window.
- Enter your name and password for the new account.
- Exit everything after setting the new account. Then, Navigate to Settings > Accounts > Family & other users.
- Expand the New user section and click on change account type. A new popup menu will appear.
- Switch the Account type to Administrator from Standard User.
- Click ok to save the changes.
Restart your computer after implementing all those changes. When the PC reboots, log in with the new account and try installing the application which you failed earlier. That will fix the error that occurred while creating a new directory.
Read more on how to Fix Update Error Code 0x80004005 in Windows 11
2. Clear System Cache
The stored cache can slow down your system, sometimes damaging even more. Not cleaning a PC’s cache files for a long time generates unusual crashes and errors. Clearing out caches from time to time helps you avoid such errors.
Here are the steps to cleaning a computer’s stored caches:
- Click on your PC’s start menu and type disk cleanup > Press Enter.
- Select the C:\ drive and click Ok.
- Click on Clean up system files from the bottom.
- Select the Windows installed drive and click Ok. In my case, it’s C:\.
Note: If you want to wipe out temporary files, check on the box named temporary files and click Ok.
This process will take a minute or two to complete. After that, restart the computer and try installing the application that was failing to create a directory folder.
If the problem is not resolved, try implementing the following solution.
Also related: Registry Filter Driver Exception BSOD in Windows 11
3. Solve Creating Directory Issues using Command Prompt
When regular administrative functioning fails, you need a bolder approach to change the functioning. Command prompt is the tool for you to execute the administrative functions properly.
Apply the following tweaks to your cmd to create a new directory in Windows 11.
Here are the steps to fix unable to create a directory while installing an application:
- Type cmd in the Windows search menu.
- Select Run as administrator from the right side.
- Copy this command; DISM /Online /Cleanup-Image /RestoreHealth.
- Paste it into the command prompt and hit Enter.
Wait for a while to allow the system management tool to verify if there is any data corruption. System Management will fix it in case there are any issues.
You may also like Windows 11 Import & Export Registry Keys from Command Line
4. Disable Controlled Folder Access
If the previous solution couldn’t resolve the Windows 11 error, this one might. When you disable the controlled folder access, Windows no longer provokes the applications to create a directory folder.
Here’s the procedure to disable controlled access to fix error 1317 during installation:
- Open Windows settings by pressing Windows + I keys together.
- Navigate to Privacy & Security > Windows Security.
- Click on Virus & Threat Protection. A new window will pop up.
- Select Manage Settings from the Virus & Threat protection settings.
- Scroll down to locate Controlled folder access.
- Click on Manage Controlled folder access.
- Toggle off the section and restart your computer.
After rebooting, try logging in with the administrative account you created in the first place. That should work to solve unable to create a new directory file error.
Check out our separate post: Create Invisible Folders in Windows 11
5. Disable Windows Firewall
Windows detects most third-party applications as threats. That’s why it creates issues while installing an application. And if you are to install a game, you know how many times Windows defender deletes the executable (.exe) files.
Turn off the Windows firewall to prevent that issue on Windows 11.
Here’s the process to disable the Windows firewall for fixing errors while creating a directory:
- Press Windows + S to open the Windows search.
- Type Control Panel and hit Enter.
- Navigate to System & Security > Windows Defender Firewall.
- Click on Turn Windows Firewall on or off from the left pane.
- Select Turn off Windows firewall in both options.
- Click ok to save the changes.
Your problem with creating a new directory will be resolved after this solution.
You may also like to read: Windows 11: Unable to Change Mouse Settings
6. Change Permission of the Program Folder
If the program folder (C:\) doesn’t have the permission to create a new pathway for the application you want to install, you can’t launch a new directory file.
Allow the program folder full control to avoid such scenarios.
Here are the steps to change program folder permission to create a new directory:
- Log in with the Administrative account you created earlier (Method-1).
- Open the File Explorer in Windows 11 and move to C:\ drive.
- Right-click on program files and select properties.
- Go to the Sharing tab and select the Advanced sharing option.
- Tick on Share this folder and click on permission. A new window named Permissions for program files will pop up. I’ve added screenshots for your better understanding.
- Click on the tickbox Full Control then Apply > Ok to save the changes.
Try installing the application that has failed to access the directory. Now you’ll find error 1317 is not occurring like before.
These are the solutions you need to implement when an unfortunate error occurs while trying to create a file in the destination directory. Have further queries regarding this matter? Check out the following section.
Frequently Asked Questions
How do you fix an error that occurred while attempting to create the directory?
Make sure to create an administrator account to log in. After that, Go to Windows Security settings and disable Controlled folder access. That will help prevent error 1317 from appearing on Windows.
How do I fix the setup was unable to create a directory?
Go to Settings > Privacy & Security > Virus & Threat protection > Turn off Real-time protection.
How do I fix error 1317 on Windows 10?
Create a new Administrative account > Clean out system cache > Disable Windows firewall. That should solve error 1317 on Windows 10.
Throughout this article, I’ve focused on why an error occurs while trying to create directory files. And, most importantly, how you can solve the error efficiently.
Initially, disk checkup via command prompt can help you with the problem. Then after disabling virus & threat protection for some time, restarting and installing the application in Windows safe mode can help you resolve the issue.
However, if any of these solutions couldn’t resolve your problem, feel free to comment here. My team will be more than happy to assist you in solving the problem.