views:

17

answers:

1

Hi: I have many solutions, each solution containing at least one project (lets supose they are only windows application projects). Then, I produced one installer (msi) solution for each windows solution. So, I have myWindowsSolution1 & myInstallerForMyWindowsSolution1 (file1.msi), myWindowsSolution2 & myInstallerForMyWindowsSolution2 (file2.msi)...

Now they want to put installers altogether into 1 only installer. Is it possible to do this without losing the automatic rollback??? What I tried is to make an app that loops through each installer file and execute the file, the problem is that, if one of them fails, the already installed ones would remain installed:

for (int i = 0; i < installers.Length; i++) {
    Process p = Process.Start(installers[i]);
    p.WaitForExit();
}

I tried also putting every msi file (previously converted to exe) into myInstallerForMyWindowsSolution1, under CustomActions->Install but again I lose the rollback.

Merging all code into 1 only very big solution would be the last option.

Thanks in advance.

+1  A: 

One way is to make one big "wrapper" installation that contains all the individual setup MSI's. You mention that you tried something like that by saying, "I tried also putting every msi file (previously converted to exe) into myInstallerForMyWindowsSolution1, under CustomActions->Install but again I lose the rollback."

Here's the thing: you need to create Custom Actions not only for each installation, but ones to uninstall the applications, too. Thus, if during installation one of the custom actions returns a failure code, then the MSI will start with the rollback process, which will include un-installing any of the embedded MSIs. Make sure that failure codes from your install custom actions trigger the rollback, and that failures codes from the uninstall custom actions do not.

ewall
thanks ewall... sadly, the custom action stuff is not so "opened" as I would like, so I tried another approach, thanks anyway
Rafael

related questions