Best practice for preserving user configuration files during upgrades? - Advanced Installer Community
marktuan
Posts: 2
Joined: Sat Jul 18, 2026 12:56 pm

Best practice for preserving user configuration files during upgrades?

Hi everyone,

I'm creating an MSI installer with Advanced Installer for a desktop application. The application stores a JSON configuration file inside the installation folder, and users often modify this file after installation.

When I release a new version, I want the installer to update the application files but keep the user's existing configuration file unchanged. At the same time, if a clean installation is performed, the default configuration should still be installed.

What is the recommended way to achieve this in Advanced Installer? Is it better to rely on file versioning, component settings, a permanent component, or a custom action?

I'd also like to know how this behaves during repair and uninstall so I don't accidentally overwrite or remove user data.

Thanks in advance for any advice or examples!
Catalin
Posts: 7847
Joined: Wed Jun 13, 2018 7:49 am

Re: Best practice for preserving user configuration files during upgrades?

Hello and welcome to our forums,

If you add the JSON file as a regular file (not in the Windows Installer format), the easiest way to achieve what you need is via the "Do not overwrite" existing file option.
Screenshot_149.png
Screenshot_149.png (26.39 KiB) Viewed 15140 times
The condition there should be "OLDPRODUCTS" to ensure it is not removed during an upgrade.

Let me know if there is anything else you require help with.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”