[wix-users] Install initial config file but none after that unless version updated

Hoover, Jacob Jacob.Hoover at greenheck.com
Mon Feb 20 13:42:37 PST 2017


Config file is XML, so you should be able to use WiX CA's to update it via XmlFile. I'm fairly certain it is safe as in it won't trigger Windows Installer into thinking the user modified the files. 

Depending on when you schedule RemoveExistingProducts, you could read the desired values before removal of the existing and then write the values after install of the new.  It may be possible if REP is scheduled later that the file would just stay, but I forget the rules behind a non-versioned file. (IE, is it just the last modified time matching that lets WI skip the file, or would it also hash.)

As for adding another parameter, I'd do that with a XmlFile CA as well.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Johnny Smith
Sent: Monday, February 20, 2017 2:15 PM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] Install initial config file but none after that unless version updated

I need to install the application.exe.config file when the application is first installed; however, after the first installation, I want to manage the updates to the config file based on the version number of the file. How do I accomplish this?

 

I put connection string information in the config file. So, I don't want to overwrite the user's connection string information each time an update is installed but I would like the option to overwrite the file should another parameter be added to the file during a later update.

 

Johnny Smith

President
CenGen Technologies, Inc.
P.O. Box 2037
Mansfield,TX 76063
Ph: (682) 518-9251

W: http:// <http://www.cengentech.com/> www.cengentech.com <http://www.cengentech.com/> 

 


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


More information about the wix-users mailing list