[wix-users] Merge changes for Config files and IIS settings
Christopher Painter
chrpai at iswix.com
Mon Mar 4 07:46:12 PST 2019
If you must meet the "requirements" I don't have any suggestions. If the requirements are negotiable I can tell you how this would handle this with a prospective customer.
1+2) Keep "stock" / "default" data owned by the installer and "custom" data owned by the user in separate files. For web.config/app.config this can typically be handled by leveraging the appSettings file attribute to point to an override file. Simply put MSI wasn't designed for meging two sources of truth in an XML file. This is typically a 20 minute discussion so hit me up if you need more information.
3) I tell customers to tell their customers that the installer owns the website/application that it creates. Now basic override / variation points can be supported by leveraging the iis:WebSite ConfigureIfExists=No but at some point if they need to do something very different then the installer then they should just create their own website pointed to the same document directory and manage it themselves.
I have many customers that ship shrinkwrapped web applications like this and it always works out for them keeping it simple this way.
________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Ven H via wix-users <wix-users at lists.wixtoolset.org>
Sent: Monday, March 4, 2019 4:28 AM
To: WiX Toolset Users Mailing List
Cc: Ven H
Subject: Re: [wix-users] Merge changes for Config files and IIS settings
Does anyone have any inputs? Please help.
On Fri, Feb 22, 2019 at 11:26 AM Ven H <venh.123 at gmail.com> wrote:
> I have a business requirement. I know many eyebrows will be raised, but
> unfortunately, I need to achieve this requirement.
>
> There is an application folder that already exists (which was probably
> installed by some other MSI). Now, I have to install the same application
> folder using my MSI. The application folder has a lot of config files.
> Since the end customer would have made some changes to this config, my MSI
> should not overwrite these files. But, the config file changes from my MSI
> should be merged from my MSI. For this, I think I may have to use a Custom
> Action. However, I have the following challenges / questions.
>
> 1. If a file already exists and my MSI also has the same file to be
> installed, will the file from MSI overwrite the existing file? If so, can
> this be prevented selectively ( I don't want some selected files like
> config files to be overwritten) by using NeverOverwrite attribute (Will
> NeverOverwrite work on files outside of MSI, i.e., the files already
> present and not installed by MSI or it will work 2nd time when the same MSI
> is being installed or upgraded)?
>
> 2. Let's say this file is not overwritten and merged using Custom Action,
> what will happen when I run an Upgrade again using my MSI? Will it
> overwrite the other files (config file components will have NeverOverwrite
> attribute and hence they will be spared, I believe)?
>
> 3. I have similar requirement for IIS (web sites and app pools). They
> might have been created manually or using another MSI. First time, when I
> run my MSI, they should not be recreated since the end customer could have
> updated some settings manually. So, I should be able to merge the changes.
>
> Please help / advise.
>
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list