views:

935

answers:

2

I want to be able to produce a single MSI from VS08 which can be used to install e.g. demo, staging and production versions of the same app on the same website in the same IIS. In other words, the user needs to be in control of how many instances they want - I'm not in a position to pre-generate them by varying the product code (though in reality there is going to be a realistic upper limit of 10). <EDIT>The transforms route requires similar a priori knowledge AFAICT (bott suggested this route and while it would work, it would not make for a great customer experience)</EDIT>.

Other instances of my question exist, without answers at:

The ideal answer would be OOTB with VS08 but I wouldnt be surprised if this is yet another dead end with this. (BTW the best info on MSI ASP.NET installers I've seen is this scottgu post).

MSDEPLOY seems up my alley, so I was looking at something wrapping it, only I want to be able to support non-server OSes like XP and Vista.

I see signs of an upcoming InstallShield product that seems to do just that, which based on pain from 10 years ago I'd be keen to avoid, but am not completely averse to switching to something less painful. One side benefit would be that my [TeamCity] CI server wouldnt need to be polluted with a copy of VS for no good reason (and no, I definitely wont be needing to keep it there to run MSTESTs either :D).

A: 

I have a Windows project where we use WIX to create the MSI files. We have a WIX file for each of our different environments. Once our continuous integration server finishes a build, we get a "Setup" folder that contains separate MSI files for dev, test, model, & production. Each of them gets installed to separate folders with separate app.configs.

It's not all integrated into one MSI like you wanted, but it accomplishes something similar.

David
Thanks David, I already do something similar - customising the .vdproj per environment for internal purposes. Problem is that's not possible for the user after it's been compiled into an MSI (Hence "I'm not in a position to pre-generate them by varying the product code")
Ruben Bartelink
+2  A: 

Have you read this ? Installing Multiple Instances of Products and Patches

my advice is to use wix. you can use your current msi and decompile it with "dark". dark creates all xml files you need from your msi. then you can make the changes with wix and after that you can integrate the steps into your msbuild process.

Bernd Ott
With the transforms, according to http://msdn.microsoft.com/en-us/library/aa369528(VS.85).aspx it still looks to me like you need to pre-generate the sets up front. Then you add a param to msiexec to trigger one of the transforms.
Ruben Bartelink
I guess I could pregen 10 and document that for multiple instances one msiexecs with a param that uses one of them. What I had been hoping for was to have a GUI that allows them to pick instances and/or assign 'labels' of their choosing to them. Otherwise they have to remember that '1' means 'test'.
Ruben Bartelink
Having said that, I have a good idea that I should be in WixLand - and the mention of 'dark' earns my +1 and more, as I was worried about cost of conversion.(Got another OOB mention of Wix as being what the big kids use-guess I was just putting off becoming a big kid of install as long as possible!)
Ruben Bartelink
the other thing, you can modify you msi directly by the db access api. for those multiple instances you need only change few things.this can done with a small bootstraper.http://msdn.microsoft.com/en-us/library/aa368250(VS.85).aspx
Bernd Ott
Hi Bernd, There's certainly power in them there functions, thanks very much for the pointer. I do tend to side with "These functions should only be used by custom installation actions and authoring tools" on the referenced page though :P (Will report back when I do attack this issue in the end...)
Ruben Bartelink