My Experience of the Same Problem & Fix Result
I am very knowledgable of PCs and Windows which means that I can fix nearly all faults, usually without too much trouble, in fact I'm often called to fix problems on friends and neighbour's PCs. I have however experienced exactly the same problem with the system locking files for up to a couple of minutes on Windows 7 x64 and I've been tearing my hair out trying to fix it for months. It has caused all sorts of problems, too many to list, for example LOTRO (Lord of the Rings Online) failed to update as it couldn't update the main EXE due to it being locked, unfortunately the updater then fell over without letting me retry in a few minutes which would have worked as the lock lasts about 1-2 minutes. This left the game in a state where it couldn't even run the updater again and I had to download a special standalone updater to allow me to attempt the update again which still failed every time with exactly the same problem. I eventually managed to work-around the problem by renaming the problem EXE after waiting a couple minutes for it to unlock before running the downloaded stand alone updater. Even a Windows update (a security update for NET framework 4.0) failed today and when I looked up the error code it was because it didn't have the required permissions (almost certainly the same problem), luckily after reloading Windows it worked on a second attempt, but this problem is now really bugging me and I just know that eventually it will most probably cause something very serious to fail that could be a lot more difficult to fix / workaround.
I have tried numerous things to attempt to resolve the problem including disabling my antivirus software (Comodo Internet Security) and so many other things that I could write for ages. I refused to reinstall Windows as this would be a massive amount of work with all my applications + games and it's an overkill solution that still wouldn't have diagnosed the real fault. Obviously re-installing Windows wouldn't even guarantee that the same fault wouldn't return in future either as one still wouldn't understand what triggered it in the first place and this would put me back to square one.
Finally I have actually found a post that is actually useful after lots of searching useless forums and websites. I have set the Application Experience service to Automatic and have started it as suggested on a previous comment, it was disabled as I am a Windows tweak buff and normal documentation suggests that this service isn't normally essential. After running some tests the problem appears to be resolved, I will know for certain after a lot more testing over time, but it's certainly looking very good so far (I will update). Assuming this is the fix I'm very surprised that it's not documented anywhere properly, Microsoft should obviously reword the description of this service to make people aware that it is an essential part of Windows where disabling it may cause serious problems. The current description, "Processes application compatibility cache requests for applications as they are launched" doesn't sound essential as normally caches are optional although sometimes they can improve performance, but waiting up to a few minutes for a file to become unlocked without it is a lot worse than just poor performance as it causes all sorts of errors and problems.
Thankyou very much for the very useful information.
