Solve Error: Unable to Execute File in The Temporary Directory

This blog post discusses an error that occurs when you try to install a program on Windows computers and methods to fix it. The error message reads as follows:

Fix Error Unable to execute File

‘Unable to execute file in the temporary directory. Setup aborted. Error 5: Access is denied’.

This error usually occurs due to insufficient permissions or rights, firewall or antivirus issues or security issues in the temp folder. Now let us see how to resolve this error, so you can install programs without any issue.

Solution 1: Run the program as administrator

Since the error is associated with permissions and rights, it is advised that you run the program as administrator to resolve this problem.

Just right click on the file/program you were going to install and click Run as administrator. This should help you install the application and run the program. If not, proceed to the next step.

Solution 2: Assign security permissions to the temp folder

Assigning security permissions to the temp folder is also found to resolve the error ‘Unable to execute file in the temporary directory’. To do this, follow the steps below.

  1. Open Run command by clicking on Windows + R keys
  2. Then type ‘%temp%’ in the Run dialogue or directly go to ‘C:\Users\Username\AppData\Local’
  3. Then right-click on the Temp folder and select Properties
  4. Then select Security > Advanced
  5. In the Permissions tab, make sure all 3 options ‘System’, ‘Administrators’ and ‘Your Username’ are assigned Full Control and applies to This folder, subfolders and files

Please note that all these 3 options should be inherited from ‘C:\Users\Username’. If the option ‘Include inheritable permissions from this object’s parent’ is not selected, click on Change Permissions and select it. Then proceed to remove permissions that are not inherited.

  1. Finally, click Apply to save these changes and now try reinstalling the program you were trying to install.

This should hopefully resolve the error, but if it doesn’t proceed to the next step.

Solution 3: Create a temp folder

  1. Create a ‘temp’ folder under C: drive
  2. Right click on My Computer > Properties
  3. Click on Advanced System Settings and in the System Properties window, select the Advanced tab
  4. Choose Environment Variables
  5. Click on ‘TMP’ under User variables
  6. Change the value from ‘%USERPROFILE%\AppData\Local\Temp’ to ‘C:\Temp’

Now you should be able to install the program without any problems. We hope one of the solutions described in this post help you resolve the error.

Recover files using Yodot File Recovery software

If you have any files that are inaccessible or deleted accidentally, no need to worry because you can use Yodot file recovery software to your rescue. Using this tool, all kinds of files like documents, Word documents, Excel files, notes, photos etc. can be recovered. The software performs a really quick scan and recovers lost or deleted files. Refer Yodot file recovery for details on the product and the steps involved.

Not just that, Yodot also offers another variant to recover files from inaccessible drives or corrupted drives. No matter if the drive is your system or any storage device like external hard drives, USB flash drives or memory card; they can all be recovered using the tool. Please refer recover files from corrupted USB for more details.