I recently tried to install an MSI for a WCF project in a new Windows Server 2008 environment.

We previously had some of the “normal” issues with .Net 4 not being installed and such. However, after addressing these issues the MSI wouldn’t even start. All we got was an installation form telling us

The installer was interrupted before Application could be installed.

We tried to install the MSi with logging using:

msiexec /i msiname.msi /log

This got us a log which contained the following:

INFO   : [09/19/2011 15:10:35:672] [SetTARGETSITE]: Custom Action is starting...
INFO   : [09/19/2011 15:10:35:672] [SetTARGETSITE]: CoInitializeEx - COM initialization Apartment Threaded...
ERROR  : [09/19/2011 15:10:35:688] [SetTARGETSITE]: FAILED:    -2147221164
ERROR  : [09/19/2011 15:10:35:688] [SetTARGETSITE]: Custom Action failed with code: '340'
INFO   : [09/19/2011 15:10:35:688] [SetTARGETSITE]: Custom Action completed with return code: '340'

After a bit of searching, we managed to track this back to the lack of IIS 6 Management Compatibility in the Web Server Role.  The reason behind this is that an MSI built for previous IIS versions can’t find the default web site in IIS without the Compatability pack.

This msdn article will give a guide on how to add the IIS 6 Management Compatability.

Update 2015-11-11: It seems the previous link has gone out of time. Here is a new link relating to this in IIS 7.