navigation
 Friday, July 13, 2007

Like many developers, I have both VS2003 and VS2005 installed on my machine. I had also placed a shortcut to the Visual Studio  command prompt in my programs menu. A couple of days ago, I had the opportunity to write my first Windows service application. I got everything set the way I wanted, and it was time to install. So, I opened up the VS command prompt, and typed in the magic chant "installutil servicename.exe". And fairly promptly got the error "Exception occurred while initializing the installation: System.BadImageFormatException: the format of the file 'servicename.exe' is invalid...".

If you're encountering the same error, make sure that you're using the correct installer. For me, it turned out that I was using the VS2003 installer. As soon as I switched to the installer from VS2005 (using the correct command prompt), everything worked just fine. It took me a while to track this down - perhaps this will save you some time.

Thursday, August 14, 2008 9:18:17 AM UTC
thanks for your tip; my problem is a different thing, but it's also related to installutill, I constracted my rist windows service by following the steps in a blog which i found in the net, but whenI finished and tried to install it using visula studio 2005 command prompt, i got the message: 'installutil' is not recognized as internal or external command, operable porgram or batch file.
can you help me in this because I don't know what to do, and by the way I am admin on my computer, because it was written in the bblog that I should be admin to use installutil
mahmoud
Tuesday, June 23, 2009 8:47:36 PM UTC
Hi. Nothing changes your opinion of a friend so surely as success - yours or his. Help me! There is an urgent need for sites: Topamax and gerd. I found only this - topamax and restless leg syndrome. Lamisil reviews, cheap medicine without prescripton, leading uk based online clinic, prescription drugs without a prescription, free secure medical consultations. Chloroquine phosphate all prescriptions for sleep pills are limited to doses. Thanks :confused:. Rex from Poland.
Comments are closed.