Executable File(s) Locked After Execution

  • Thread starter Michael R. Copeland
  • Start date
M

Michael R. Copeland

After posting a problem here regarding "Locked Directories" I've
found it's a bit different than I stated: a compiled program .EXE
becomes "Access Denied" after it's run. I compile the program, and I'm
able to delete the fil;e without difficulty. However, if I run it (even
minimal functionality), something sets a non-visible flag for the file
that makes it impossible to delete (or overwrite) the file. (!!)
I can't imagine what could be causing this, but I am willing to take
a "brute force" approach: if I can find some utility that will delete a
named file _regardless_, I'll use it. Does anyone know of such a
program or batch file sequence that will delete a file, regardless of
its access rights? TIA
 
T

Terry R.

The date and time was 1/18/2008 8:34 PM, and on a whim, Michael R.
Copeland pounded out on the keyboard:
After posting a problem here regarding "Locked Directories" I've
found it's a bit different than I stated: a compiled program .EXE
becomes "Access Denied" after it's run. I compile the program, and I'm
able to delete the fil;e without difficulty. However, if I run it (even
minimal functionality), something sets a non-visible flag for the file
that makes it impossible to delete (or overwrite) the file. (!!)
I can't imagine what could be causing this, but I am willing to take
a "brute force" approach: if I can find some utility that will delete a
named file _regardless_, I'll use it. Does anyone know of such a
program or batch file sequence that will delete a file, regardless of
its access rights? TIA

Hi Michael,

The only thing I can think that your program is doing is either staying
resident or it is keeping files open, which would prevent a deletion of
the EXE.

--
Terry R.

***Reply Note***
Anti-spam measures are included in my email address.
Delete NOSPAM from the email address after clicking Reply.
 
M

Michael R. Copeland

After posting a problem here regarding "Locked Directories" I've
The only thing I can think that your program is doing is either staying
resident or it is keeping files open, which would prevent a deletion of
the EXE.
Definitely not the case: I'm creating the file with Visual Studio 6.0
(C/C++) and have been doing so for years. No changes to anything in
that system that I know of, and the file can be deleted/overwritten
_if_I_don't_execute_it_. Furthermore, if I execute an older program
(months old) and attempt to delete it, the same failures occur.
This behavior started after the last automatic Microsoft update, and
I have not installed or updated any software.
Therefore I'm left to conclude that the latest update has somehow
caused a "file access lock" on any .EXE file that's executed. Some
further reading via Google also informs me that such things are more
common in XP than other Windows versions - and that they do happen!
The solutions I've read so far are almost impossible to use for my
situation: reboot to Safe Mode and do some arcane things that are for
the most part beyond me. I'm only trying to recompile programs I'm
developing/maintaining, and having to reboot to Safe Mode every time I
find/fix a bug is intolerable.
I am quite interested in hearing if anyone else has seen this problem
(which, as I say, is likely caused by the MS update), and to find out if
anyone can contact MicroSoft to seek a fix. This is very scary...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top