[Error 5] Unable To Execute Files In The Temporary Directory

Brithny updated on Sep 15, 2020 to Data Recovery Resouce | How-to Articles

The error "unable to execute file in the temporary directory" may occur when you try to install a new program on your computer. When the notification appears, you can't install any software successfully unless you solve the error. Read on to get the evidence-based solutions.

On this page, you will find four fixes to fix unable to execute file in the temporary directory issue:

Workable Solutions Step-by-step Troubleshooting
Fix 1. Run File as Administrator Right-click on installer file > Select "Run as Administrator"...Full steps
Fix 2. Check Security Right Navigate to C:\Users\[Username]\AppData\Local > Right-click Temp folder and select "Properties"...Full steps
Fix 3. Create New Temp Folder Navigate to C: and create a new folder named Temp > Right-click PC and select "Properties"...Full steps
Fix 4. Disable Firewall Disable your anti-virus, anti-spyware, and firewall applications...Full steps

Unable to Execute File in the Temporary Directory

Unable To Execute Files In The Temporary Directory

You may receive the error message shown in the image above when you run a setup file to install a program. But don't get mad at the software or doubt its origin, the software is innocent. It is caused by system issues or software-protection utilities. The error "Unable to execute the file in the temporary directory. Setup aborted. Error 5: Access is denied" indicates that you are trying to make modifications to the folder which you don't have access to, as you can see in the notification -  "Access is denied".

Generally, you can't continue the installation just by closing the Window. Instead, you need to resolve the issue first and then proceed with the software installation. 

4 Fixes to Unable to Execute File in the Temporary Directory

To fix the unable to execute file error, you have four tips to try. After you try any of the tips below, install the software again and see whether the error 5 still exists.

Solution 1. Run the File as Administrator

Like the error "You’ll need to provide administrator permission to copy this file/folder" when you don't use the computer as the administrator, you may be limited while using it. Most of the people who have been struggling with the software installation due to this bug claim that they have managed to bypass it simply running the file as administrator. 

Step 1. Right-click on the installer file.

Step 2. Choose "Run as Administrator". Then the software may be installed successfully.   

Solution 2. Check the Security Right

The problem may be caused due to security right issues if the first solution fails. Try the following steps:

Step 1. Navigate to C:\Users\[Username]\AppData\Local.

Step 2. Right-click on the Temp folder and select "Properties".

click temp folder and select the properties
Step 3. Select "Security" and click "Advanced".

select security and click advanced
Step 4. On the "Permissions", you should see three options:

  • "SYSTEM" with Full control which applies to ‘This folder, subfolders and files’
  • "Administrators" with Full control which applies to ‘This folder, subfolders and files’
  • "Your Username" with Full control which applies to ‘This folder, subfolders and files’

All these permissions inherited from the C:\Users\[Username]\ folder. If you don’t have the ‘Include inheritable permissions from this object’s parent’ option ticked, click on "Change Permissions".

change security permissions to fix the issue

Step 5. Mark "Include inheritable permissions from this object’s parent" with a tick, click "Apply" and then "OK". Click "Continue" if there are any problems, then remove the permissions that aren't inherited.  

After all the steps above, you can try to upgrade your software or reinstall your software again.

Solution 3. Create a New Temp Folder

Step 1. Navigate to the C: drive and create a new folder named Temp.

Step 2. After that, right-click on This PC (or My Computer) and select "Properties".

Step 3. Find the "Advanced System Settings" link on the left pane and click on it.

Step 4. Click the "Advanced" tab and select "Environment Variables".

Step 5. Double click on the "TMP".  

Step 6. Change the value %USERPROFILE%\AppData\Local\Temp to C:\Temp.

Step 7. Close the window and try to install the software that you’ve preferred.

Solution 4. Disable the Firewall

It may be HIPS (Host-based Intrusion Prevention System HIPS) causing this false positive. Try fully disabling your anti-virus, anti-spyware and firewall applications.

Extra Tip: How to Keep Data Safe

As data loss occurs on a daily bases, it's always necessary to get a data recovery software tool to rescue your data in the first time. If you want to recover deleted, formatted, inaccessible files, free data recovery software - EaseUS Data Recovery Wizard can help! EaseUS data recovery software can restore lost files with simple clicks.

Your Reliable Choice - EaseUS Data Recovery Wizard

  • Recover deleted, formatted, and inaccessible data in different data loss situations.
  • Recover photos, audio, music, and emails from any storage effectively, safely and completely.
  • Recover data from the recycle bin, hard drive, memory card, flash drive, digital camera and camcorder.

Was This Page Helpful?


Frequently Asked Questions

1. Why choose EaseUS Data Recovery Wizard?

"EaseUS Data Recovery Wizard is the best we've seen. It's far from perfect, partly because today's advanced disk technology makes data-recovery more difficult than it was with the simpler technology of the past, but it's fast and efficient..."PCMag

"The first thing you'll notice about EaseUS Data Recovery Wizard Pro is that its interface is very clear and uncluttered, with only a small collection of self-explanatory controls. You won't find lots of extra options hidden in a system of hidden menus, either; what you see really is what you get."techradar

"Recover lost files, even after deleting a partition or formatting your drive."Macworld

2. Why cannot I recover 2GB data for free?

It is recommended to check the version installed is Free or Trial because they are different versions.

Trial has data preview function but cannot save any files, while the Free version enables to recover 2 GB files. The default free space is 500 MB and you may share the product on social media to get another 1.5 GB.

3. Why cannot the recovered files be opened?

A file is saved as 2 parts on the storage device: directory info (which is comprised by file name, time stamp and size info, etc.) and data content.

If the files with original file names and folder structures cannot be opened, one possible reason is the corrupted directory info. There is still a chance to recover the data content with the RAW Recovery method in our software.

4. Why isn't it suggested to recover the files back to the original drive?

The storage structure of the lost files would be altered or damaged by any changes on the drive. If you save the recovered files back to the same drive, the original data structures and data content would be corrupted or overwritten, which causes permanent data loss. So you should prepare another disk to save the files.

5. How can I check whether my data is recoverable or not before purchase?

The Free version helps you save 2GB files, so verify the recovery quality of our product before purchase.

6. How long does it take to scan the drive?

It strongly depends on the capacity of your hard drive and the performance of your computer. As reference,most drive recoveries can be completed in around 10 to 12 hours for a 1-TB healthy hard drive in general conditions.

About Data Recovery Wizard

It's super easy to recover 250+ types of files after deletion, disk formatting and virus infection. Click the links and compare the difference of each version.