2

This issue is mostly coming up in the context of software development, but I'm asking it here because it also cropped up with an entirely unrelated program.

Essentially, the problem that I'm encountering on my computer is that sometimes, when I attempt to overwrite an EXE file that I had run previously, I get an "access denied" error, even though the EXE in question is not currently running. In fact, I can't even run the EXE again, and when I go to investigate the permissions, I can't even read them (as seen below).

Nor can I delete the file, even when I am using an administrator command prompt. The only way I can delete the file is if I restart my computer without using Fast Startup (i.e. not hibernating the kernel), at which point normal permissions are restored to the file and I can delete and overwrite it again. This made me suspect that the kernel was holding on to the file, and when I go into ProcessExplorer, the SYSTEM process, sure enough, had a handle to the EXE.

So, what might cause the kernel to leak a handle to an EXE like this? Is it just a bug in the new Windows update? Could it perhaps be a driver, such as a graphics driver? In other words, what should I track down and uninstall so that I don't have to keep restarting my computer?

enter image description here

EDIT: An additional bit of information: when I restart the computer, the EXE in question is completely gone.

EDIT 2: Here is the information from Process Explorer: Handle under System process in ProcessExplorer Handle Properties Handle Security Properties

TheHans255
  • 167
  • 9
  • 1
    I had a similar problem after compiling an exe that overwritten a previous version, it suddenly would not run. Apparently there was a process still loaded into memory. Killing it would respawn that process (which was of Visual Studio) but it released the handle and the problem went away. It has returned a few more times, but killing that process was the answer every time. (the error message provided me with the name of that exe file) I got the error after trying to recompile the program. – LPChip Oct 30 '17 at 21:23
  • I'm going to bet on your antivirus software. – u1686_grawity Oct 30 '17 at 21:23
  • @grawity could be, but in my case, on Windows Server 2016 without anti virus, I had the same problem. – LPChip Oct 30 '17 at 21:24
  • This may be a simple user permission issue not as complex as you think. Try `icacls` command. – Biswapriyo Oct 30 '17 at 21:25
  • 2
    @Biswa unlikely. A permissions issue would not be fixed with a reboot. It clearly sounds like a file is stuck on random-access mode. – LPChip Oct 30 '17 at 21:26
  • What type of handle was it? Can you provide a screenshot of the handle properties dialog from Process Explorer? – HelpingHand Oct 30 '17 at 21:45
  • Sure it's not running in the background? Tasklist /fi "imagename eq AnimatorEditor.exe" – TOOGAM Oct 30 '17 at 22:21
  • @TOOGAM Absolutely sure it's not running in the background. I look at both Task Manager and Process Explorer and it is not running at all. Also, if I restart the computer *with* Fast Startup (hibernating the kernel, but killing all processes), the problem persists. – TheHans255 Oct 30 '17 at 22:25
  • @HelpingHand I added screenshots about the handle. – TheHans255 Oct 31 '17 at 14:53
  • I have no useful information to add except I've been seeing this happen often as of late. Primarily if I try to upgrade software, it gets stuck on trying to overwrite one executable and a reboot clears it. Happens on a number of systems, only commonality is Windows 10. – Jesse Slicer Nov 03 '17 at 18:54

0 Answers0