However, you may experience issues when installing applications or start them up. You may attempt to install software on your PC and get the error that says- The above error message is common in Windows; so, you have nothing to worry about. It shows up if you try to install applications or modify a folder without having sufficient privileges to the directory or application. You may also be unable to execute the file in the temporary directory due to an infection of your computer system. Before proceeding with the troubleshooting steps in this guide, be sure to perform a virus scan on your PC.
Unable to execute file in temporary directory
This error has been around for the last several years, and it prevents you from installing or opening programs. Use the following solutions to get rid of this error message. In the sections that follow, you’ll find breakdowns on performing the above operations for fixing the Error 5.
1] Run the file as an Administrator
You may be getting this error because the user account lacks sufficient privileges to install applications. Even when the error is caused by a bug, many users have bypassed it by running it with elevated privileges. In case you don’t know how to do this, it’s easy. Simply right-click on the file as select the Run as administrator option from the context menu.
2] Create a TEMP folder
You need to create a new Temporary files folder and name it Temp. Open File Explorer and go to the C: drive. Open it, right-click on the empty space, select New > Folder, and create a new folder. Name it Temp. Next, right-click on This PC (called My Computer in earlier Windows versions) and click on Properties. Click on the Advanced System Settings link on the left-hand pane and a new window will open. Navigate to the Advanced tab and click on the Environment Variables button at the bottom. Double-click on TEMP from the box at the top and on the new box that opens, you should see the following value in the field provided: Remove it and change the value to: Hit the OK button to save the inputted value and exit the windows you opened.
3] Change Permissions
You can fix the error by performing the following operation: Open File Explorer and go to C:\Users[username]\AppData\Local. Here, right-click on the Temp folder and choose Properties from the context menu. Go to the Security tab and click on the Advanced button. In the new window, you’ll see the following user permission categories – System, Administrators, and another with your username. The above categories (objects) inherit their permissions from their parent. Therefore, you should be sure to enable the option for this. Click on Change Permissions and mark the checkbox beside Include inheritable permissions from the object’s parent. Finally, hit the Apply button to save your changes and the OK button to close the window. Click on Continue and delete the inherited permissions. Hope this helps.