Dev
Posts: 17
Joined: Mon Oct 06, 2008 6:55 am

Advice for MSI Chaining

I have a single installation that installs 2 separate components of our product - either website, windows service (which may reside on a separate server), or both (standalone installation).

I need to install ASP AJAX Extensions 1.0 - but ONLY if the web component feature has been selected. So a prerequisite doesn't work (because then we would ALWAYS require AJAX installation even if not a web installation). I can't assume that clients will have Windows Installer 4.5, nor can that be a requirement or prerequisite - therefore MSI chaining won't work.

I created a custom action with a .Net DLL that checked if it was installed, then kicked off the AJAX MSI if it needed to be installed - but of course I get error 1618 (another MSI installation is already running)...

We had already established that it was a requirement to automatically install the AJAX extensions as part of our installation. It seems that all I am left with is to package the actual DLLs in with my installation and not actually run the installation MSI. This is last resort, and bad form - but do I have any other choices other than to try and kick off a process that waits for the installation to finish before running the AJAX in the background? I don't want to create separate installers for web and service tiers...
Dev
Posts: 17
Joined: Mon Oct 06, 2008 6:55 am

Re: Advice for MSI Chaining

Maybe an idea for a future enhancement would be to keep the bootstrapper running until after the installation to allow conditional post-install MSI chaining without actually using MSI chaining.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Advice for MSI Chaining

Hi,

In a future version of Advanced Installer the prerequisites will be handled by the installation package UI, so you will be able to install them based on options selected by the user. Until then, a solution is to use a custom action. There is a similar thread on the forum which may help you:
http://www.advancedinstaller.com/forums ... f=2&t=8498

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dev
Posts: 17
Joined: Mon Oct 06, 2008 6:55 am

Re: Advice for MSI Chaining

cosmin wrote:Hi,

In a future version of Advanced Installer the prerequisites will be handled by the installation package UI, so you will be able to install them based on options selected by the user. Until then, a solution is to use a custom action. There is a similar thread on the forum which may help you:
http://www.advancedinstaller.com/forums ... f=2&t=8498

Regards,
Cosmin
I don't believe that will work if the other installation is a MSI (as it is in this case) - that's almost exactly what I did - I created a dotNetCustAct in InstallExecuteSequence --> InstallFinalize which did a process.start on the other MSI package - and you get error 1618 (another MSI installation is already running).

Are you describing something different than what I tried? I didn't try asynchronous execution - however even then both MSIs would be still be running at the same time hence you would still get the 1618 error. I'm willing to take another look if you're describing something different, but I think I already tried what you're suggesting and it's a no go.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Advice for MSI Chaining

Hi,

Please note that the "Asynchronous execution, do not wait for return" option will make the custom action run in a different process. Also, the main MSI will not wait for the custom action to finish and it will continue its installation. Since your custom action would be scheduled under "InstallFinalize" this is what would happen:
- the main MSI reaches InstallFinalize and launches the custom action
- since the custom action runs asynchronously and its return code will not be verified, the MSI finishes its installation
- the custom action starts running

If the custom action is synchronous, it will be executed in the process of the installation and the 1618 error will be shown. Please try using this option and let me know if the problem persists.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dev
Posts: 17
Joined: Mon Oct 06, 2008 6:55 am

Re: Advice for MSI Chaining

cosmin wrote:Hi,

Please note that the "Asynchronous execution, do not wait for return" option will make the custom action run in a different process. Also, the main MSI will not wait for the custom action to finish and it will continue its installation. Since your custom action would be scheduled under "InstallFinalize" this is what would happen:
- the main MSI reaches InstallFinalize and launches the custom action
- since the custom action runs asynchronously and its return code will not be verified, the MSI finishes its installation
- the custom action starts running

If the custom action is synchronous, it will be executed in the process of the installation and the 1618 error will be shown. Please try using this option and let me know if the problem persists.

Regards,
Cosmin
Is there a way to set Asynchronous execution on either a dotnetcustomact.dll action or a .msi? If I add the .msi directly, it greys out the asynchronous options, as it does if it is a dotnetcustomact. I guess I'd have to create an .exe that launches it?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Advice for MSI Chaining

Hi,

The "Asynchronous execution, do not wait for return" option can be set for any custom action in the Custom Action Properties pane. However, the MSI should not be added directly as a custom action. Instead, you can use a "Launch file or open URL" custom action.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”