How can I have different properties, etc. In the vs 2010 installation project for two different release versions?

I want to have only one installation project in my solution, and I want to be able to install versions of "release1" and "release2" (as in versions of debug / release1 / release2) at the same time on the same machine. So, release1 version needs its own program folder, product codec and shortcuts, etc., and release2 version also needs its own unique versions of these things.

However, the installation project does not seem to preserve separate properties for two different release versions. These all seem to be different output paths, and of course they use different generated exes.

Will I have to move to Wix to solve this problem? Or is there something simple that I'm missing here? It seems silly that you cannot configure the installer for different things for two different versions. So far, it looked like I would have to do another setup project, which would be annoying because I don't like supporting one project, not to mention 2.

Thanks in advance for your help.

Isaac

+2
source share
1 answer

Creating two different installation projects, one of which is called Production Installation , and one of which is called Test Setup , may be the cleanest way, because it makes the OS believe that you are supplying two different products, which actually takes place here.

Moving to WiX, as you yourself suggested, really has the advantage that you can reuse components in your configuration projects, avoiding the need to maintain the same list of files twice, for example.

There is, of course, one more option. If your Production installation and your Test Setup projects are almost identical, and you just need to exchange some GUIDs (for example, product or package code to force MSI to consider them to be different), create a simple script that copies the first installation project file to a second location and exchanges the GUIDs in the file (which is nothing more than an XML file). Thus, you only need to save the first project file and easily restore the second one by restarting the script.

Personally, I do such things in VBS, but you can also use powershell to do this or write a simple tool in any language that can handle XML or RegEx.

+1
source

Source: https://habr.com/ru/post/1341099/


All Articles