John said:
When trying to delete a file, I get "Error Deleting File or Folder
Cannot delete DBDesigner 4.0.4.9: It is being used by another person
or program. Close any programs that might be using the file and try
again." XP Home, using administrator account. I've tried shutting
down and turning on again in safe mode. Why is this happening?
I take it that you mean that you get the same error after re-booting
into Safe Mode (you didn't actually say)?
DBDesigner is a front-end to MySQL, yes? MySQL runs a server service so
it could be that this service is using the file.
Control Panel->Administrative Tools->Services and look for MySQL. If
it's running, stop the service and try deleting the file (of course the
service may not start again ;-) ). It may be that DBDesigner itself runs
a service or runs in the background from Startup or one of the Run keys
in the registry.
On a more general note about this error it can happen when the program
that uses the file has been closed, but hasn't terminated cleanly and is
hanging around as a zombie process; it doesn't appear on the desktop,
and if you open Task Manager it doesn't appear in Applications, but it
*does* appear in Processes. If that is the case then select it and click
End Process. Having said that, it won't persist across a reboot.
A more frequent reason (IME) is that Explorer itself is "using" the
file. Using Process Explorer from Sysinternals,
<
http://www.sysinternals.com/ntw2k/freeware/procexp.shtml> and searching
for the file handle it shows explorer.exe as the culprit. Close Explorer
and the file is released (according to PE) however, if you start
Explorer again, it re-locks the file. If you kill the Explorer.exe
process it will release the file permanently but it also restarts the
desktop (the Explorer shell). Generally this isn't s problem but some
icons may not re-appear in the system tray (even though the programs
that own them are still running). A better solution is to close Explorer
(to release the file) and then delete the file/directory from a DOS box.