If when you boot your Windows 11 or Windows 10 computer, or when you try to run an executable to install a particular program on your device, you receive the error prompt with the message INTERNAL ERROR: Cannot create temporary directory, then this post is intended to help you with adequate solutions to this issue.
A temporary directory or folder is where temporary files (or non-permanent files) are stored by software or applications. It may include cache data, configuration files, and other data of applications installed in your system to reduce the load time. A Temp folder is created automatically when Windows installs and its location is C:\Users\%username%\AppData\Local\Temp.
Affected PC users reported that when this error occurs, they cannot open certain installed programs on their devices, like Chrome and Norton Internet Security. Also, Windows Update keeps throwing the There were some problems installing updates errors.
INTERNAL ERROR: Cannot create temporary directory
If you are faced with this issue, you can try our recommended solutions below in no particular order and see if that helps to resolve the INTERNAL ERROR: Cannot create temporary directory issue that has occurred on your Windows 11/10 device.
- Run Program Install and Uninstall Troubleshooter
- Run the File and Folder Troubleshooter
- Run the executable file with Admin privilege
- Run Disk Cleanup
- Run CHKDSK
- Assign Full Control permissions to the Temp folder
- Manually create new Temp folder
- Format partition/drive
- Perform System Restore
- Reset Windows 11/10
Let’s take a look at the description of the process involved concerning each of the listed solutions.
1] Run Program Install and Uninstall Troubleshooter
If you have encountered the INTERNAL ERROR: cannot create temporary directory issue on your Windows 11/10 device when you try to install a software, you can run the Program Install and Uninstall Troubleshooter from Microsoft and see if that helps. The Program Install and Uninstall troubleshooter helps you automatically repair issues when you’re blocked from installing or removing programs. It also fixes corrupted registry keys.
Read: Error 1317, An error occurred while attempting to create the directory
2] Run the File and Folder Troubleshooter
Run the File and Folder Troubleshooter and see if the error in hand is fixed.
3] Run the executable file with Admin privilege
If running the Program Install and Uninstall Troubleshooter didn’t help, you can run the executable file with admin privilege and see if the software installs successfully without throwing the error in view. Try the next solution if the error reappears.
4] Run Disk Cleanup
Some files will be generated in a temp directory of the C: drive when you try to install a program on your Windows 11/10 computer. This error can occur if the available space of the system drive is insufficient or if you do not have the permission to create a temp directory there. In this case, check/analyze the available space of C: drive – and if the space is not enough, run Disk Cleanup on the drive or clean up Hard Disk via the Settings app on your device.
5] Run CHKDSK
This solution requires you to run CHKDSK to repair bad or corrupted sectors, which can cause inconsistencies in drive integrity and consequently trigger the error in view.
To run CHKDSK, do the following:
- Press Windows key + R to invoke the Run dialog.
- In the Run dialog box, type cmd and then press CTRL + SHIFT + ENTER to open Command Prompt in admin/elevated mode.
- In the command prompt window, type the command below and hit Enter.
chkdsk /x /f /r
You will receive the following message:
Chkdsk cannot run because the volume is in use by another process. Would you like to schedule this volume to be checked the next time the system restarts? (Y/N).
- Tap Y key on the keyboard and then reboot your computer to let CHKDSK to check and fix the errors on the computer hard drive.
After CHKDSK completes, check to see if the issue is resolved. Otherwise, try the next solution.
6] Assign Full Control permissions to the Temp folder
This solution requires you to assign Full Control permissions to the Temp folder residing on the system drive on your Windows 11/10 PC.
This should only be used as a temporary measure. Once your work is done, you should restore the folder’s Permissions to their default.
7] Manually create new Temp folder
This solution requires you to manually create new Temporary files folder and name it Temp on the system drive and change the variables.
Do the following:
- Open System Properties.
- Click on Advanced System Settings.
- Navigate to the Advanced tab.
- Click on the Environment Variables button at the bottom.
- Double-click on TEMP from the box at the top.
- Now, replace the value below in the field:
%USERPROFILE%\AppData\Local\Temp
with
C:\Temp
- Click OK > OK.
- Click Apply > OK to exit System Properties.
If the issue is still unresolved, you van try the next solution.
8] Format partition/drive
This solution requires you to format the partition/drive. Alternatively, you can create a new partition on your drive, and if need be create a Temp folder and see if that helps.
9] Perform System Restore
If you don’t get this error when you boot your Windows 11/10 computer or when you try to install software on your device previously, then it’s entirely possible that the issue was facilitated by a change that your system has gone through recently that you are unaware of.
In this case, since you have no idea what changed that might be triggering the error in view, you can perform System Restore (any changes like application installs, user preferences and anything else made after the restore point will be lost) to revert to a date prior to when the issue started.
10] Reset Windows 11/10
At this point, if nothing has worked for you and the issue persists, you can reset Windows to resolve it. When performing the reset operation on your device, choose the option to keep your personal files.
I hope this helps!
How do I fix Unable to execute a file in the Temp directory?
If you receive an error saying Unable to execute file in temporary directory (Error 5: Access Is Denied) when installing software or starting an application, then you should run the program file or application file as administrator and check if it works. You can also manually create a Temp folder, or change the permissions of the Temp folder. For this, access the Advanced Security Settings of the Temp folder, select your username and use the Change permissions button. Select the Replace all child object permission entries with inheritable permission entries from this object option and save the changes.