windows-installerupgradesilent-installeradvanced-installer

Upgrading a silent installation


Good morning everyone , I have been using Advanced Installer very little and I have a problem.

I have an msi that is launched as a silent installation, the question is that since I couldn't think of how to update it silently, I added the custom action when launching the msi installation of "UninstallPreviousVersions".

The problem is that there are certain files that they must not be modified/deleted since they are user configuration files.

Is there a way to protect those files? Or also, is there a more optimal way to update?


Solution

  • the upgrade is done automatically, you do not have to do any custom modifications to your setup package.

    All you have to do is:

    1. increase the version

    2. change the ProductCode

    This way, when you will install the newer version, it will automatically remove the older version and then install the newer version (this is the default behavior of Windows Installer).

    Now, regarding the prevention of removal of files, please refer to this article which explains how to achieve what you need:

    https://www.advancedinstaller.com/user-guide/qa-keep-file.html