Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a peculiar wish to install an msi twice on a machine. The purpose of the double install is to first install under the pre-production folder, run the deployment in a safe environment prior to deploying in the production folder.

We typically use separate machines to represent these different environments however in this case I need to use the same box.

The two scenarios I get are as follows:

  • I've installed pre-production, I'm happy, I want to install production, I run the msi, it asks whether I want to repair or remove the installation
  • I've production installed, I want to install the new version of the msi, it tells me I already have a version of the product installed and I must first un-install the current version

The first scenario isn't too bad as we can at that point sensibly un-install and re-install under the production folder, but the second scenario is a pain as we don't want to un-install the live production deployment.

Is there a setting I can give to msiexec that will allow this?

Is there a more suitable different approach I could use?

share|improve this question

5 Answers 5

up vote 3 down vote accepted

Have a look at what Scott Willeke's Less Msiérables (LessMSI) can do for you ...

http://blog.scott.willeke.com/2008/03/less-msirables-lessmsi-is-available.html

Use it to extract and change guids and/or contents of MSI, repackage and execute your 'install twice' need.

share|improve this answer

Virtualise, seriously

share|improve this answer
1  
That is a great solution +1 –  EBGreen Aug 14 '09 at 19:24
1  
This answer makes me smile every time I read it. Agree. Seriously. –  Stein Åsmul Oct 14 at 20:40

It is not possible to install the exact same MSI twice. You might be able to open the MSI and change the GUIDs to get it to install a second time. Be aware that this way there be dragons. Unless you are exceptionally lucky or the install/product is exceptionally simple, I can almost guarantee that not only will your second install not work, most likely you will break the first install too. I would highly recommend working out whatever issue makes you think it is necessary to use one box.

share|improve this answer

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):

  1. Virtualize - I like the fact that this sort of removes the whole problem.
  2. Side-by-side install: (Multiple MSIs PROD / DEV / UAT capable of side-by-side co-existence (Internal app only)
  3. Instance Transforms? (as I said, haven't used it - but this is what it is supposed to help for)
  4. Environment aware MSI (Single MSI capable of installing as PROD / DEV / UAT) (Internal app only)
share|improve this answer
    
Very thorough answer. Never heard of instance transforms before, so that was very useful. I think it might be the actual answer here? As you said, it was devised to accomplish exactly what the OP asked. Do you have any reasons to "not trust" msi here? It's a very old and stable system, this must have been exhaustively tested by now. –  julealgon Feb 3 at 14:11

The thing that stops you installing it twice is the ProductCode Guid if you change that it will remove the "this product is already installed" message and let you install. That is what an instance transform is doing but you can do the same by opening it in Orca and changing the productcode in the property table.

Obviously even if you do hack it to install twice you want to make sure you aren't overwriting in the same locations.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.