[wix-users] Overwrite file only if modified

Christopher Painter chrpai at iswix.com
Fri Mar 29 07:37:18 PDT 2019


Can you change the design of the application?   Could you have a  local.ini and a local-user-override.ini?     .NET apps do this with app.config files. 

The concept is  the installer would "own" and always install local.ini   and not know anything about the override file.  The user would put override values in the override file and the installer would never touch it.  The application would use these two layers to determine the final value and everything just works easy.  No fussy installer stuff to deal with.

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Alexis C?t? via wix-users
Sent: Friday, March 29, 2019 9:22 AM
To: wix-users at lists.wixtoolset.org
Cc: Alexis C?t? <alexiscote19 at hotmail.com>
Subject: [wix-users] Overwrite file only if modified

Hi everyone!

I'm trying to change the CouchDB windows installer to ensure that local configuration files remains on uninstallation.

At the moment, a premade file called (local.ini) is shipped with the application. CouchDB's team what to:

1. On uninstall, keep the local.ini file if it was changed

or

2. Let's assume  we make this file permanent. On install, it should only overwrite the local.ini file if it was changed.


>From my research, there doesn't seem to be any support from WiX out of the box.

My first untested  solution was to use custom actions to:

1. Make the local.ini file permanent
2. Make the local.ini file NewOverwrite="yes"
3. On uninstall, check if the file was modified. If  yes, we delete it using a custom action script.

Do you have any ideas on how I could do that?

Regards,
Alexis

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



More information about the wix-users mailing list