View Full Version : Exception occurred while initializing the installation

06-19-2008, 03:59 PM
I have just upgraded from Installshield 2008 to 2009.
When I build my Basic MSI project in IS 2008, it work fine but when I build it in IS2009 and run it, I get the following error:

Error 1001 exception occurred while initializing the installation.
System.BadImageFormatException: The format of file is invalid file 'MyService.exe' is invalid...

Any ideas why?


PS: MyService is a .Net Application file.
PS2: I installed IS2009 on a Win Server 2003 and buit my setup and ran it...with no problem. The above problem occurres when I build the setup with IS2009 on XP.

Mike Marino
06-20-2008, 10:14 PM
Does your application require a certain version of .Net to be installed?

06-23-2008, 08:30 AM
This issue most often occurs when a .NET assembly is loaded with the wrong version of .NET. Generally speaking, it happens when a .NET 2.0 assembly is loaded using the .NET 1.1 runtime.

The easiest way to check this is to go to Tools -> Options -> .NET and then change the location of Regasm.exe and InstallUtilLib.dll to point to the correct version of the .NET Runtime.

06-23-2008, 10:39 AM
Thanks a lot, that was it. I had to pick the right version of InstallUtilLib.dll.