Hello Rob,
The "Updater" and the term "upgrade" are indeed correlated. Please allow me to explain them and maybe we can better understand the concepts.
So basically, Windows Installer (the base technology that Advanced Installer is built upon) has two ways of upgrading a setup, those being:
- a major upgrade (we will refer to this as
upgrade)
- a minor upgrade (we will refer to this as a
patch)
A patch is usually much smaller in size and it consists of the diffs between two packages (an MSI is basically a database). After diffing two MSIs (e.g. version 1.0.0 and 1.0.1) the changes will be saved into the patch file (MSP). At install time, the patch basically attaches to the already installed MSI, i.e.: version 1.0.0 is installed --> we apply the patch --> we obtain version 2.0.0.
As I have mentioned earlier, one advantage of patches consists in the fact that it is much smaller in size. However, a disadvantage would be the fact that it can not act like a standalone installation - it is imperative that the older version is already installed.
A major upgrade is considerably larger in size. A major upgrade consists of two steps:
- the uninstallation of the older version
- the installation of the newer version
A major upgrade can act like a standalone installation, i.e. it can either upgrade its' previous versions (e.g. version 1.0.1 upgrades version 1.0.0) or it can be simply installed (e.g. the user installs version 1.0.1).
At a "lower" level, the differences between the two consist of:
- in a major upgrade, the
ProductCode is always changed
- in a patch, the
ProductCode stays the same
The
ProductCode property is a unique GUID used to identify your application. This identifier varies from version to version of the same installer.
It is important to note
that two products with the same ProductCode can not be installed on the same computer. Windows Installer will prevent this with an error reading:
Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Programs and Features in the Control Panel.
Now that hopefully these concepts are a bit cleared, let's try to explain the Updater. The Updater is basically a custom .EXE of ours that automates the upgrade/patch process, i.e. instead of you manually providing the upgraded version to your users, you can use the Updater which does that automatically.
Now, let's try to shed some light over the provided information:
My Custom Action on Uninstall, Regular Uninstall, Replace by a New Version is working with condition = (Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" )). Custom Action is defined for "Uninstall" and is located in the Install Execution Stage (confusing) between "Paths Resolution" and "Preparing" ... it needs to run before any files are actually removed by the AI uninstall process.
So basically the installation process consists of two parts -
client and
server.
In Advanced Installer, these two are represented by
"Wizard Dialogs Stage" (client) and
"Install Execution Stage" (server).
The
"Wizard Dialogs Stage" represents the stage of the installation where the dialogs are spawned.
The
"Install Execution Stage" represents the stage where the files are installed (it basically starts when the user presses the
"Install" button). To be more precise here, this would be the stage where the system is modified by your setup and the system is modified in both install and uninstall.
Regarding the
'A more recent version is already installed' message:
I was able to resolve this problem, apparently when I did "Save As" on my original AIP project and gave the project a different name something must have changed with the GUIDs??
Anyway, I went back to building the installer from the original .AIP project and that message no longer appears during an update.
First of all, I am really glad you were able to solve this.
Secondly, you are right about the GUIDs. I have explained why this is happening in the following thread:
A more recent version of xxxx is already installed on this computer.
HOWEVER, the updater is now prompting me for the "Modify, Repair, Remove"?
The dialog you are prompted with means that the setup was launched in Maintenance Mode.
There are two ways of launching your setup in Maintenance mode:
- from Control Panel by selecting your setup and clicking on the
"Change" button
-
when you launch the same setup that was already installed
In our specific scenario, only the second option is viable. This basically means that the Updater downloads the exact same version of your setup.
In more technical terms, this means:
- the same version
- the same
ProductCode
As explained above, the ProductCode is used to identify a product. Windows (and more specifically Windows Installer) will consider two products having the same ProductCode the same product, even if they are totally different products.
We can end up in this situation by having a wrong condition and an incorrect criteria set in the
"Update Installed Detection" tab of your
"Updates Configuration" project.
Basically, the updater will check the wrong criteria --> will think that an update is indeed available --> will prompt the user --> will then download the wrong version (most likely, the URL you have provided points to the same version) --> when the same version will be launched, the setup will enter in Maintenance Mode.
Hope this helps!
Best regards,
Catalin