[wix-users] Features that share installation paths

Blair Murri osito at live.com
Fri Jan 6 13:18:07 PST 2017


The reason I asked is because if you have multiple rows in the File table in your MSI referencing files of the same name in the same directory you will have validation issues (warnings and/or errors) as that is not the model the original architects of MSI appear to have envisioned.



For identical files I'd recommend structuring the WXS files to maintain the file components each in their own fragments, associate those components with their features from one or more fragments separate from the any of the fragments containing the harvested components (both of which the harvester can be configured to do for you), and post processing the WXS to remove the duplicate components (fixing up the ComponentRefs as needed).



For any files that are actually different yet share the same name and directory one of the cleanest ways is to change the file names in the File/@Name attribute to make them unique, then create a “semi-custom action” that populates the MoveFile table based on the selected feature sets to either copy or rename the files to restore the needed names. Whether to copy or rename will depend on the level of disruption that an “unprompted” repair of your product might cause, due to renamed files appearing to be missing after installation completes.



Sent from my Windows 10 phone



From: Joseph L. Casale<mailto:jcasale at activenetwerx.com>
Sent: Friday, January 6, 2017 10:14 AM
To: 'WiX Toolset Users Mailing List'<mailto:wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Features that share installation paths



> Are those shared paths identical files, or different files of the same name that vary by feature selection?

Hi Blair,
They are shared paths. I only declare the installation root in the primary wxs file.
As this is merely an admin helper package with the contents maintained in desperate
git repos, I do not maintain the nested hierarchy in the installer. I recognize this is
not a typical scenario so if a facility to make this work does not exist, I can maintain a
reference in the WXS but I had hoped to avoid this just for this package.

Thanks,
jlc

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list