ISWIX, LLC View Christopher Painter's profile on LinkedIn profile for Christopher Painter at Stack Overflow, Q&A for professional and enthusiast programmers

March 19, 2008

InstallShield 2009 Beta Part I ( Multiple Instances )




I'm not really sure if I can talk about this or not.... so lets just say I didn't sign an NDA and don't take anything I say here as some kind of future looking statement or something. In other words, anything can change from the beta to gold.

That said, I've been so swamped lately that I really haven't given this the attention it deserves: InstallShield 2009 is in beta and I'm really excited about a couple features!

At my last job, I was responsible for build and install for a single tenant SaaS system that consisted of ASP.NET WebServices, WinUI and WebUI clients. This system lent itself to needing the ability to have different versions installed in parallel with different configuration options. At the time, InstallShield 12 had the ability to generate and embed product code changing multiple instance transforms but the bootstrapper lacked the ability to service these instances. As a result I authored a custom bootstrapper that interacted with the MSI API and simple reflection against the MSI database to connect the pieces into a solution that looked very much like InstallScripts multiple instance support. In fact I wrote about this on my blog: Multiple Instance MSI's and InstallShield 12. This blog article has continued to be very popular among my visitors.

Well to make a long story short, I met the InstallShield development team last year and decided to give them an informal presentation on where I though a future version of InstallShield could go. And go did they:


Support for Installing Multiple Instances of a Product
InstallShield now includes support for creating an installation that allows an .msi package to be used to install multiple instances of a product in the same context on the same machine. Use the new Multiple Instances tab for a product configuration in the Releases view to define different instances of your product and configure the properties that are associated with each instance.

At build time, InstallShield creates a product code–changing instance transform for each instance and streams the instance transforms into the .msi package. At run time, the setup launcher displays a new instance selection dialog that lets end users specify whether they want to install a new instance, or update or maintain an already installed instance.

In addition, if you build a patch in the Patch Design view for a product whose installation includes multiple-instance support, InstallShield now creates a patch that enables end users to update a specific instance or all instances. At run time, the Update.exe file displays a patch version of the instance selection dialog.

A new /instance command-line option is available for Setup.exe and Update.exe. This option lets you specify which instance you want to install, update, or uninstall; it also lets you suppress the instance selection dialog.

Multiple-instance support is available for Basic MSI and Web projects.


But this is but one of many great new features that should be in InstallShield 2009. I'll write about more of them when I get some free time. ( Hint: MSI 4.5 support, Feature linked Prereqs, .NET Managed Code Custom Actions without InstallScript and without ComVisible(true), ability to use an MSI handle and MSI interop from within the CA ) and much much more.

8 comments:

Unknown said...

Hi Christopher,
I'm using IS 2008 premier. And If I go into the Project->setting->Maintanenace Tab. I can already see the multiple install option there for the Pure Installscript projects. Is it the same thing you are trying to explain here.
Also, I'm using Installscript MSI project, How can I handle this multiple instances thing with this type of project? Can you please give me any direction.

Thanks,
Mayur.

Christopher Painter said...

The story is similar, but the way MSI handles multiple instances is very different from the way a pure InstallScript project handles it.

As for InstallScript MSI in IS2008, I don't think it can be done without upgrading is IS2009 because of the way you need the setup.exe to pass the ISScript UI handle.

Unknown said...

Hi again,
Thanks for the reply.
But in this post you have mentioned - "Multiple-instance support is available for Basic MSI and Web projects.".
So is it also available for Installscript MSI projects?

Christopher Painter said...

Hmmm, you know, I never looked at this ( because I never use InstallScript MSI project type ) and strangely the multiple instances tab is missing from the Product Configuration properties panel when the project type is IScript MSI.

I'm going to have to ask InstallShield why this is. For a workaround it could probably be done the way I did it for a VDPROJ based customer once:

1) build your IScript MSI in IS2009 and tell it to use Embedded UI ( no setup.exe required

2) write a script that reads an xml file to generate the ProductCode instance transforms and stream them into your MSI

3) Write a custom bootstrapper ( like I blogged about back in the Oct 2006 blog post ) that queries MSI and the streams to figure out which instance to service.

Hmmm... interesting.

Unknown said...

Hey, Thanks again.
I have already read your previous blog explaining custom bootstrapper.
I'm actually a .Net developer. And all these installer things are first time for me. Do you have any sample of this. beacuse it is really hard for me to understand all these terms like bootstrapper....

Nick.Cook@AceCad said...

This article is excellent and just what i needed and worked a treat. However i have tried to incorporate this idea into the new Installshield 2012 Suite Project type, to try and pass the transforms InstanceID as an msi install parameter so i can have multiple suite boot straps. I think The Suite project looks in the msi to pick out the default InstanceID when determining to run in Maintenance mode. Can anyone help. I have tried everything the only way i can get the multiple suites to install the same msi, is to the change the msi productcode and rebuild the msi. Which defeats the whole put of having multi Instances. I am hoping that this is an under-site of the Suite project type and will be fixed in the future.

Thanks.

Nick.Cook@AceCad said...

This article is excellent and just what i needed and worked a treat. However i have tried to incorporate this idea into the new Installshield 2012 Suite Project type, to try and pass the transforms InstanceID as an msi install parameter so i can have multiple suite boot straps. I think The Suite project looks in the msi to pick out the default InstanceID when determining to run in Maintenance mode. Can anyone help. I have tried everything the only way i can get the multiple suites to install the same msi, is to the change the msi productcode and rebuild the msi. Which defeats the whole put of having multi Instances. I am hoping that this is an under-site of the Suite project type and will be fixed in the future.

Nick.Cook@AceCad said...

This article is excellent and just what i needed and worked a treat. However i have tried to incorporate this idea into the new Installshield 2012 Suite Project type, to try and pass the transforms InstanceID as an msi install parameter so i can have multiple suite boot straps. I think The Suite project looks in the msi to pick out the default InstanceID when determining to run in Maintenance mode. Can anyone help. I have tried everything the only way i can get the multiple suites to install the same msi, is to the change the msi productcode and rebuild the msi. Which defeats the whole put of having multi Instances. I am hoping that this is an under-site of the Suite project type and will be fixed in the future.