Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I first came across this error when trying to write a program in Java that executes a .EXE that is packaged within the .JAR. At first I thought the issue was related to my program, or Windows 7 in general but after testing on two other Windows 7 machines, I can conclude that it is specific to my laptop.

Basically, I get an access denied message whenever I try to execute a program in "C:\Users\Andy\AppData\Local\Temp", even though I am using an Administrator account. I have looked at the permissions for the folder and there are only entries for Andy, and the Administrator, neither of which are inherited. And the check box that says inherit permissions from parent directory is disabled, and not ticked.

Any ideas what may be going wrong?

UPDATE: I've just logged in to the Built-In Administrator account and given my account ownership of the folder (I couldn't do it from my account), and now I can execute programs now. However, I would be interested in why this would have happened and how else I could have solved the issue.

share|improve this question
You need to adjust the permission on this folder. Try to take ownership of the folder. – Ramhound Sep 8 '13 at 18:25
@Ramhound How would I take ownership of the folder? – Andy Sep 8 '13 at 18:41
how you take ownership of a folder is well documented what have you tried? – Ramhound Sep 9 '13 at 11:12
@Ramhound I used the registry file found here to Take Ownership, but it hasn't changed anything at all. I did right click and select Take Ownership on the folder, and the CMD did show...… – Andy Sep 9 '13 at 18:00
If your using a reg file to tKe ownership of a folder your doing it wrong – Ramhound Sep 9 '13 at 18:31

There are some antivirus application that block execution from the temp folder. This is because this is a likely place for a virus to get downloaded into. The user has to explicitly move an executable out of the folder to run. It is an added layer of security.

share|improve this answer
Thanks for your answer, I like the idea but in this situation, antivirus programs weren't the issue here. Useful answer for others though, and I clearly need to add a backup fail-safe location, so +1 – Andy Sep 12 '13 at 19:01
McAfee has this feature. The "C:\ProgramData\McAfee\DesktopProtection\AccessProtectionLog.txt" might have entries like this: "11/14/2014 11:57:35 PM Blocked by Access Protection rule CORP\username C:\ETC\PROCEXP\PROCEXP.EXE C:\Users\username\AppData\Local\Temp\PROCEXP64.exe Anti-spyware Maximum Protection:Prevent all programs from running files from the Temp folder Action blocked : Execute" – David Resnick Nov 14 '14 at 22:22
up vote 3 down vote accepted

First of all, thank you to a @Ramhound for his helpful comments.

The issue was indeed due to ownership. However, the issue forced me to use the Built-In Administrator account in order to grant my 'standard' account ownership to the Temp folder. After that, everything worked fine.

share|improve this answer

I just saw the same thing on a Windows 8 computer. I suspect it may be that the ownership issue can happen if the user account being used is not the first account created on the machine. In my case the account being used is the second account created on this Windows 8 computer.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .