Update Outlook addin with .msi install but keep existing .config App. Settings file from previous install

Add-in Express™ Support Service
That's what is more important than anything else

Update Outlook addin with .msi install but keep existing .config App. Settings file from previous install
 
tadams




Posts: 78
Joined: 2015-12-01
Hi,

My Outlook addin uses Application Settings to store some addin wide properties such as API tokens and URLs on a per client basis. When they install the addin these seem to be stored in the installation directory in a .config file, which I presume is read on addin startup.

Ideally if I have an update to our addin I want to be able to run the installation .msi or .exe and it overwrites the existing files with the updated ones, however I would like to keep the existing .config file (so I can produce a single update which works for all clients and doesn't overwrite their custom properties).

I tried commenting out the .config file in Product.wxs so it doesn't include it in the install, but when I tested this on a machine with an older version of my addin already installed it seemed to delete the existing .config file.

Do I need to add any specific commands to the Product.wxs file so it doesn't delete existing files within the install directory and only overwrites ones with the same name...etc? Is there a better way I can create this 'patch' install that will allow clients to manually update the addin but it keeps the original .config?

Thanks,
Tom
Posted 11 Apr, 2016 12:58:28 Top
Andrei Smolin


Add-in Express team


Posts: 17176
Joined: 2006-05-11
Hello Tom,

According to https://msdn.microsoft.com/en-us/library/aa730869%28VS.80%29.aspx (see section Saving User Settings at Run Time), the user-level settings are stored in user.config, not in the .config file in the installation folder.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 12 Apr, 2016 08:51:29 Top