Zuhaib

A very lazy but meticulous blogger

Archive for the ‘Installer’ tag

Windows 2008 & Visual Studio Web Setup: The installer was interrupted before ApplicationName could be installed

with 11 comments

Although how much I hate creating setup packages, I had to create a few setups for some of my projects recently. While I was working on setup projects, I found that, the capabilities of Visual Studio Setup & Deployment projects are shockingly limited, and not to mention I faced a lot of issues while creating setup projects in Visual Studio. Few people suggested me to use WiX. WiX certainly is good and far more flexible solution for building Windows Installer Setup Packages, but it has got a very steep learning curve.

I will be making few posts in future about the problems, that I faced during my experience creating setup packages using Visual Studio. So, here you go. Here is the first problem.

The Problem

I was working on a simple Web Setup project in Visual Studio 2008. The setup worked fine in XP & Windows 2003 server. But, when I tried installing the setup in Windows Server 2008, I got this nice error message that said. “The installer was interrupted before <MyApplicationName> could be installed. You need to restart the installer to try again.” :(

Installation_Incomplete

Having faced many problems earlier with msi packages, I at least knew how to start the msi package in verbose mode to create the log files.

Launch your msi in verbose mode:

msiexec /i yoursetup.msi /lv "C:\yourdirectory\logfile.txt"

I searched for terms like “ERROR” & “FATAL” in the log file :) . I got this.

Action ended 15:57:43: WEBCA_MYSETUPTARGETVDIR. Return value 1.
MSI (c) (8C:20) [15:57:43:204]: Doing action: WEBCA_SetTARGETSITE
Action start 15:57:43: WEBCA_SetTARGETSITE.
MSI (c) (8C:20) [15:57:43:206]: Note: 1: 2235 2:  3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'WEBCA_SetTARGETSITE'
MSI (c) (8C:A0) [15:57:43:226]: Invoking remote custom action. DLL: C:\Users\ADMINI~1\AppData\Local\Temp\1\MSI4225.tmp, Entrypoint: SetTARGETSITE
INFO   : [03/31/2010 15:57:43:286] [SetTARGETSITE                           ]: Custom Action is starting...
INFO   : [03/31/2010 15:57:43:287] [SetTARGETSITE                           ]: CoInitializeEx - COM initialization Apartment Threaded...
ERROR  : [03/31/2010 15:57:43:290] [SetTARGETSITE                           ]: FAILED:    -2147221164
ERROR  : [03/31/2010 15:57:43:291] [SetTARGETSITE                           ]: Custom Action failed with code: '340'
INFO   : [03/31/2010 15:57:43:293] [SetTARGETSITE                           ]: Custom Action completed with return code: '340'
Action ended 15:57:43: WEBCA_SetTARGETSITE. Return value 3.
MSI (c) (8C:20) [15:57:43:297]: Doing action: FatalErrorForm
Action start 15:57:43: FatalErrorForm.

I could see that the action WEBCA_SetTARGETSITE was failing. But I had not idea what was wrong, except that the term itself said Set Target Site failed. So I turned up to Google and landed on this blog post.

So the real problem is that my setup is unable to get the “Default Web Site” from IIS7.

The Solution

RoleManager I installed the “IIS6 Metabase Compatibility” role using Role Manager as mentioned in the blog post and my setup started working. Existing software & scripts can interface with IIS7 only if the Metabase compatibility component is installed in IIS7.

 

 

Thanks to Galin Iliev.

Written by Zuhaib

March 31st, 2010 at 10:50 am