0

I have a huge .bat file build script that calls into compilers and what not.

I have until recently been able to run this without any problems (and as I have not made any changes, I suspect there's a Windows update and/or setting at play?)

Using Windows 7

I am logged in as Administrator I run the command line with "Run as administrator"

My build script then compiles and run my application (shuts down itself which I have confirmed in "Task manager") the first time. This goes well.

But when it tries to delete the file (the application) I get "access denied"

This basicly stops me completely because it is a large build system which non-automated takes a very long time and is very error prone to do manually.

The kicker is that if I try delete the file in Windows explorer I get "need admin rights" which is kinda peculiar since... I am already an administrator... and I have also run Windows explorer with "Run as administrator". However, after some time and attempting a rename it seeems to budge and allow the file to be deleted. (I have checked, and there is no process listed in task manager which should be "holding" the file in any way, so I tend to think this is an access rights issue... somehow)

I am... Open to ideas? :)

Tom
  • 3,587
  • 9
  • 69
  • 124
  • 1
    Use Process Explorer from Winternals - then search for the file name as an open file handle to make sure there really *isn't* a handle to it open somewhere/somehow. –  Oct 26 '12 at 00:08
  • Just double verified using that tool. It is gone from the view in Winternal long before it is attempted to be replaced/deleted on disk. – Tom Oct 26 '12 at 07:51

1 Answers1

0

I have decided to move this question to:

https://superuser.com/questions/493249/windows-file-access-denied

as I think it is my Windows that is messed up somehow :(

I will still monitor this question at SO, but I think this a peculiar Windows issue I am experiencing

Community
  • 1
  • 1
Tom
  • 3,587
  • 9
  • 69
  • 124