[wix-users] Strategies for Reducing Installer Code Duplication
todd.hoatson at gmail.com
Thu Sep 17 15:56:46 PDT 2020
Our application has a somewhat complex installation strategy...
A "Base" installer with a full UI that can take 2 forms (or Bundles):
- full package including prerequisites for users without reliable internet
- partial package for users with reliable internet access to download
A Patch installer without a UI that is used for automatic updates from
within our product
Each bundle is described by a .wxs file, but there is a good bit of
duplication between the two, for example:
It seems like both bundles could use the same .wxs file, but simply have
the prerequisites in separate fragments (e.g. NetFx48 downloader or NetFx48
installer) in separate files and include the correct file for each bundle.
Is that a reasonable strategy for bundles?
The situation for the base vs. patch installers is more complicated...
The patch bundle has a lot of the same attributes for the bundle element,
but the rest of it is stripped down. There doesn't seem to be a good
strategy for reducing this duplication.
Also, the patch process builds two .msi files - one representing the
shipped product, the other representing the updated product. For this we
have 2 .wxs files which are identical, except for a comment at the top.
This can be easily remedied.
But, again, there is a duplication between the .wxs for the base .msi and
the .wxs for the patch .msi. The Product, Package and Upgrade elements are
basically the same. The Directory hierarchy is largely the same, but
different stuff is interspersed. The main difference is in the UI - so
they have different InstallExecuteSequence contents, and the patch .wxs has
What would be a reasonable strategy for reducing the duplication here?
Email: todd.hoatson at gmail.com
More information about the wix-users