I'm currently playing with a service - installing, uninstaling, connecting from remote machine, etc. Suddenly, out of the blue, when I tried uninstalling the service (by the book, using InstallUtil.exe) I get the following error:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe is not a valid Win32 application.
(in the command prompt I even get a message "Access Denied")
Being a restart-freek, I first tried to restart the machine - no change.
So I started googling my way, found several people complaining about this with no concrete reason/solution, until I found someone saying that replacing the installutil.exe file solved the problem. I looked at the .NET folder, and sure enough, InstallUtil.exe lies there, with size 0 and Date Modified - a few minutes ago !!!
?!?!?! W T F ?!?!?!
Of course, replacing the file with an uncorrupted one solved the problem (lucky for me I have two machines with .NET installed).