So last night sometime I had tweaked a few services on my Windows 7 machine, everything was fine until today when I turned my computer on. I ran into a weird issue with the application experience service which I thought I would write about to save someone in the future wasting a few hours on this like I did.
If you ever run into the problem where you cannot delete any EXE / executable files and you cannot even take ownership of the files then you have likely also disabled the "Application Experience" service. What is this service? Well here is the description.
"Processes application compatibility cache requests for applications as they are launched".
It seems when this service is disabled and a user tries to delete an EXE file it firstly looks for it in the "application cache" and basically screws up the the deletion. Process monitor shows the file is "DELETE PENDING", which basically means it's marked for deletion it just isn't deleted yet. The most common reason for this is a handle to the file still existing somewhere. However with "Application Experience" service disabled there is no visible handle, at least that can be seen in tools which show these things. The file does get deleted after some time, from 30 seconds to 30 minutes later, instead of being instantly deleted (as users would expect it to be) with the service enabled.
For most users they will likely never experience an issue with this because how often do they need to delete EXE files? For someone that uses Visual Studio or any compiler then it will rear its head. So the moral of the story is Microsoft has a shoddy service that breaks, there are hundreds of stories related to this problem going all the way back to Vista. You think Microsoft could have fixed it by now because it most certainly is a bug, I guess they just rely on the fact most people don't disable these crappy services.