Windows 7 Locking Executable Files

Solution 1:

I have a feeling that the culprit is Windows Indexing Service.

While I haven't run into such a problem myself, I read (as far as I remember, while installing TortoiseSVN or TortoiseHG on Windows 7) that there are file lock problems sometimes with the Indexing Service. Basically, the Service is trying to index the file, so it locks it while it does that.

I'm not sure if this is the right answer to your problem, but I recommend you try configuring the Indexing Service's settings, or just disable it for our development directory.

Here's some of the stuff that's written in the TortoiseSVN FAQ about a similar problem to this:

This error message typically occurs when you try to update or commit your working copy, and seems to be common on Windows 7 systems. It is due to another process holding a handle on a file that Subversion needs to move or modify. This might be a virus scanner, but on Windows 7 it is likely to be the Windows Indexing Service. Turn off the indexing service on your working copies and repositories, and exclude them from virus scans.

Hope I helped!

P.S.: I might update this answer later on with a guide to configuring the Indexing Service.