[wix-users] Overwrite file only if modified

Blair Murri osito at live.com
Fri Mar 29 12:30:34 PDT 2019


Have your installer drop/maintain a local.txt file with instructions for the user on how to maintain local.ini. The installer could also drop a local.ini as an unmanaged file (it's sort of like permanent but without the future servicing limitations, and if it already exists it will be untouched (since it's not a versioned file from MSI's perspective).

You get unmanaged components by explicitly setting the Component Guid to the empty string in WiX.

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Alexis C?t? via wix-users <wix-users at lists.wixtoolset.org>
Sent: Friday, March 29, 2019 7:45:04 AM
To: WiX Toolset Users Mailing List
Cc: Alexis C?t?
Subject: Re: [wix-users] Overwrite file only if modified

CouchDB ships with a default.ini (which contains the default configurations).
The local.ini is shipped with commented default values and comments to help users properly configure their database.

So if the user modified the local.ini, we can't touch it.
But, it the user hasn't touch the local.ini file, we want to update it so the comments and default values reflects the latest changes.

So yeah, an easy solution, would be to not ship the local.ini and let the user either copy the default.ini or configure the apps  through the UI.
But if there's a way to avoid that, that would probably better from the user's side.

-----Original Message-----
From: Christopher Painter <chrpai at iswix.com>
Sent: March 29, 2019 10:37 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Alexis C?t? <alexiscote19 at hotmail.com>
Subject: RE: Overwrite file only if modified

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 https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.firegiant.com%2F&data=02%7C01%7C%7C466304ce800c4100bf0008d6b4540d85%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636894670422623059&sdata=7vIH4JLJMpEx53bi%2BjyI8Yl0vf7WGwUiVStlcyhFbk4%3D&reserved=0

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



More information about the wix-users mailing list