views:

136

answers:

1

Is there a way to create a MSI so that it allows you to install the software in two different locations by re-running it? I'm creating a MSI to deploy a web application. I would like to build MSI once (I'm using Web Setup Project), say for staging and then once the build is qualified, I would like to run that same MSI again for yet another environment (UAT). The problem, however, is that we share the same webserver for STG and UAT (running as two different websites on IIS).

Thanks.

+1  A: 

One MSI, two different installation locations is doable as long as you are not using the same MSI on the same machine. Take advantage of properties and in particular, public and directory properties to let your MSI do conditional stuff depending on how properties are set.

If you want to use the same machine, I recommend using WiX to author two MSIs with different ProductCodes and defaults but share everything else in common. WiX makes it easy to do compile different flavors of the MSI with minimal hassle.

UPDATE: Looks like there is maybe a way to do this using some transforms to play change the product code:

http://msdn.microsoft.com/en-us/library/aa369523(VS.85).aspx

Ants