Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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... howtogeek.com/howto/windows-vista/… –  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

3 Answers 3

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

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 at 22:22

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.