When trying to run a setup file, many users receive the “unable to execute file in temporary directory” error message. How to fix the error? If you are also trying to fix it, this post of MiniTool is what you need.

According to user reports, the “unable to execute file in the temporary directory. Setup aborted. Error 5” message often appears when running a setup file to install a program. The error indicates that you are making changes to the temp folder which you don’t have access to.

It is annoying that the program installation fails due to the “unable to execute file in the temporary directory” error. Fortunately, we summarized several tested solutions to the error. Now, you can try them one by one.

How to Do If Hard Drive Won’t Power Up [Ultimate Guide]
How to Do If Hard Drive Won’t Power Up [Ultimate Guide]

Many people reported that their hard drive won’t power up. Are you also troubled by the issue? This post will help you fix external hard drive not powering up.

Read More

Fix 1. Run the File as Administrator

Sometimes, the “unable to execute file in the temporary directory Windows 10” can occur when lacking admin right. So, the first and simplest solution is to run the setup file as an administrator. Here’s how:

Step 1. Right-click the setup file and select Properties.

Step 2. In the Properties window, navigate to the Compatibility tab and tick the checkbox next to Run this program as an administrator. Then click on OK to save the change.

Tip: You can directly right-click the installer file and select Run as Administrator.

run the setup file as administrator

Now, you can install the program again and see if the “unable to execute file in the temporary directory error 5” message persists.

Fix 2. Create a New Temporary Folder

In addition, you can fix the “Unable to access directory for installation” error by creating a new temp folder. Let’s follow the steps below:

Step 1. Press Win + E keys to open the File Explorer, and then open the C: drive and create a new folder named Temp.

Step 2. Right-click This PC and select Properties.

right click This PC and select Properties

Step 3. Click on Advanced system settings, and then navigate to the Advanced tab and click on Environment Variables.

click on Environment Variables

Step 4. Double click on TMP, and then change its Variable value from %USERPROFILE%AppDataLocalTemp to C:Temp and click on OK to save changes.

change the Variable value of TMP

After that, you can close the window and install the software to check if the “unable to execute file in temporary directory” error is fixed.

Fix 3. Check the Security Right for the Temporary Folder

Sometimes, the “unable to execute file in temporary directory” error can be caused by improper security rights. In this case, you can follow the steps below to check security right for the file:

Step 1. Press Win + R keys to open the Run dialog box, and then type %localappdata% in it and hit Enter.

Tip: If you can’t find the Temp folder, you can navigate to the C:Users[Username]AppDataLocal path.

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

Step 3. Navigate to the Security tab and click on Advanced.

click on Advanced on Temp Properties window

Step 4. In the Permission entries section, you will see the following 3 options:

Advanced Security Settings for Temp

  • SYSTEM with Full Control that applies to “This folder, subfolders, and files”.
  • Administrator with Full Control that applies to “This folder, subfolders, and files”.
  • Your Username with Full Control that applies to “This folder, subfolders, and files”.

Step 5. Tick the checkbox next to Replace all child object permission entries with inheritable permission entries from this object and make sure the Inheritance is enabled.

Tip: On Windows 10, you need to tick the checkbox next to Include inheritable permissions from this object’s parent.

Step 6. Click on Apply and OK to execute changes.

Now, you can restart the computer and see if the “unable to execute file in temporary directory” error is resolved.

Fix: The Partitions on the Disk Are Not in the Recommended Order
Fix: The Partitions on the Disk Are Not in the Recommended Order

The partitions on the disk selected for installation are not in the recommended order. Have you come across the error? This post will help you fix it.

Read More
  • linkedin
  • reddit