views:

7

answers:

0

I've been tasked with building an msi installer for our custom project in Visual Studio 2005. In addition to installing the dlls we build from our code, it has to install a bunch of extra files (configuration, templates, scripts, stuff like that) that are stored in our version control system. In a couple of cases the exact file version we install depends on a user choice. Specifically, the install asks whether they are installing to a testing machine (in which case the configuration for talking to the testing server needs to be installed) or a production machine (installs config for production server).

I was trying to do this by setting a property to the result of a radio button pick, then adding both versions of the file (which both have to have the same name) to the same output directory, one with the condition "INSTALLMODE='Testing'" and the other with "INSTALLMODE='Production'" (The property values assigned to the radio button choices).

What happened was that the installer seemed to completely ignore the condition and install whichever file was first in the file list of each directory (it installed the testing version of one file with the production version of another on the same run, even). Am I missing some subtlety of the property/condition? Is what I'm doing the right way to install different file versions based on a property?

I think this might be a more general version of this question.

Can this be done with the msi tools in Visual Studio 2005? My choice of tools has been dictated by the client, so solutions involving other msi tools like InstallShield or WiX are not viable.