Monday, February 05, 2007

.NET WTF - InstallUtil.exe gets corrupted ?!?!?!

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).

9 comments:

Anonymous said...

Heh. Ironic timing: http://www.tomergabel.com/Three+Words+Oh+My+God.aspx

I'm pretty sure I know what the problem was in my case though (output redirection string due to some careless copy+pasting into a command prompt window).

Anonymous said...

That's the same thing that happened to us. I sent someone a command-line and they ran it, but it had the $P$G prompt at the beginning of the command and they overwrote the isntallutil.exe. Same thing, 0 bytes and all.

Anonymous said...

Same thing just happened to me too.
I will try to find out what I did to cause this.

Anonymous said...

That's the same thing that happened to me 100% as descrpied, Simply installing, uninstaling,got me InstallUtil.exe corrupted

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")

All patches, and fixes from XP/OS, .NET, VS2008 did not fix the issue

generic cialis said...

Interesting article, added his blog to Favorites

Anonymous said...

Not sure how this happened, but this fixed my issue as well. Thanks!

Zohar said...

Same thing heppened to me, same solution worked. thank you for publishing this, otherwise I'ld probably be still working to find a solution to this problem.

Anonymous said...

yep, happened in an enterprise environment here at work. thanks for this!!!

Anonymous said...

Same happened to me on a server. Copied InstallUtil.exe from another server fixed the problem. Thanks for the heads up