Windows Installer has a built-in feature that is supposed to allow what you want to do: "Instance Transforms", but despite all my MSI experience I haven't used it much. It allows you to install the same product several times via the MSINEWINSTANCE property and a transform set at the command line.
If this is a third party application, I would go for the virtualization approach that has already been recommended. You should be aware that you can virtualize the packages using Microsoft App-V virtual packages or just use regular VMWare or Virtual PC implementations (virtual PCs as opposed to virtual packages).
Microsoft App-V virtual packages and new virtualization technologies allow a few new things compared to a normal application:
- Application streaming - no local installation on machines - JIT
- Use two incompatible software on the same computer
- Updating through the server
- Control licensing - max simultaneous users or tie software to a group / user.
- Present the application quickly and easily to users
- More Microsoft marketing here.
If this is an internal application where you can have a dialog with the development team, a viable solution is to build a second dev MSI that installs the pre-release version side-by-side with the production version. These MSI files will then need to be authored to be able to co-exist in a civilized manner (not fight over file associations and that kind of issue).
Finally, and the approach we generally choose, we can have the MSI install a different config based on parameters passed to it. So you can have a property called CUSTOM_ENVIRONMENT = "DEV" to install a test instance of your application. This approach relies on a single MSI capable of installing itself in different flavors - though - and hence does not appear to match what you are asking for.
So in summary (in order of my subjective preference):
- Virtualize - I like the fact that this sort of removes the whole problem.
- Side-by-side install: (Multiple MSIs PROD / DEV / UAT capable of side-by-side co-existence (Internal app only)
- Instance Transforms? (as I said, haven't used it - but this is what it is supposed to help for)
- Environment aware MSI (Single MSI capable of installing as PROD / DEV / UAT) (Internal app only)