问题
The questions regarding Bootstrapper & Chaining might have been asked before. I am trying to ask something similar & different.
My requirement is to CHAIN 3 installshield msi into a single one
and expose the feature selection GUI of 2 of the MSIs
as a single feature set such that when the user selects any of the features on the top-level, that selection is passed as parameter(s) to the underlying respective msi & installation continues. User may launch this exe / setup again where he can remove / modify the features by selecting them in a usual way.
Finally, when the installation is over the package should generate a custom XML file
to be consumed by an internal tool based on the features selected by the user above.
So, there is a mix of standard and custom behavior. I have no clue about the world of installers
. May be someone can suggest how to achieve this with minimal effort or redo with correct approach ?
.
Should I write such a tool in C#/Winforms (or WPF) ?
Looks like re-inventing the wheel ? i.e. something like
- Have your own custom TreeView GUI in a standard GUI (Winforms / WPF)
- Process.Start("msiexec /i /ADDLOCAL=Feature1 msi1.msi") --> ADDLOCAL will pass the featureset parameters from my custom GUI selection.
- Hook onto Exited event of the Process
- Wait on the Process for exit
- On successful exit, fire the second msi with appropriate parameters from the exit handler & so on...
I do not know if its a correct approach ? Any help on this is much appreciated. Thanks in advance!!
(I am tagging C# for this question.)
回答1:
To be honest, bootstrappers and chainers are very complex story... far more then meets the eye. If you don't know anything about installers, you are setting yourself up for a whole lot of work. It's probably better to look at what tools like WiX (Burn) and InstallShield ( Setup Prereqs and Suite Installers ) have to offer and change your requirements to match their capabilities.
Teams at Microsoft ( this Office, SQL, Visual Studio ) have put vast amounts of time and talent to develop their custom solutions. Far more time then the rest of us typically have to spend.
Personally, I'd look into breaking your MSI's into many small "micropackages" that each have 1 feature. Then use an InstallShield Basic MSI project with setup prereqs and feature prereqs to tie it all together. There's a lot of details I left out because you have to have detailed requirements before you can spell out how you'd design for it.
WiX 3.6 ala Burn is a possibility also.
来源:https://stackoverflow.com/questions/12239861/chaining-bootstrapping-multiple-msis-merging-the-existing-msis-featureset-gu