I want to allow my users to install multiple copies of my application on a single PC; one for testing purposes, one for production system. The install is a MSI file created directly in VS2005. Is there any way to enable this? I up for using other tools to generate the install or even using Ocra directly if I had to, but for now at least InstallShield is out of the question.
You need to author a transform (.mst), which is applied to the msi before it runs. This transform can do various things, including changing the product code, it is this changing of the product code which allows more than one instance of the same product to be installed, because to the windows installer it looks to be a different product.
This transform functionality is native to the Windows installer engine, IOW you can author these files yourself, products like InstallShield just make it easier. Other msi creation products will likely have the same functionality so you could shop around, and there is likely to be a tool in the Windows Installer SDK to do it (i haven't actually looked, i just use InstallShield).
You can use this url to get you started:
http://msdn.microsoft.com/en-us/library/aa368260%28VS.85%29.aspx
Refer to the Microsoft documentation on Installing Multiple Instances of Products and Patches.
From memory there was discussion on the WiX list last month with someone trying to do this when using WiX to install multiple websites on the same server. If you can find the relevant threads there should be some more through responses than mine there :)
As slugster has stated, you need to update the ProductCode in the Property table. You will also need to change the package code in the Summary Stream Information. The easiest way to modify your MSI is by using automation with VBScript.
The Windows Installer SDK contains useful scripts (WiRunSQL.vbs, WiSumInf.vbs) that will allow modify your MSI as follows:
To change the product code
cscript WiRunSQL.vbs your.msi "UPDATE Property SET Value='{AAAAAAAA-BBB1-CCCC-DDDD-EEEEEEEEEEEE}' WHERE Property='ProductCode'"
To change the package code:
cscript WiSumInf.vbs your.msi 9={AAAAAAAA-BBB2-CCCC-DDDD-EEEEEEEEEEEE}
Just note the new codes should be a valid unique GUID.