Upgrade is not following the sequence - Advanced Installer Community
fazeelk
Posts: 32
Joined: Wed Sep 10, 2014 5:15 am

Upgrade is not following the sequence

Hi
I have created installer with "generate instances at install time" option and choose the Automatically upgrade older product versions and uninstall old version first and install new version options. I have installed one version say 1.4.0.3341 and after that I create another installer by changing the version to 1.4.1.3341. Initially it displayed the install new instance/ upgrade screen, I choose Maintain or upgrade already created instance option. Then confirmation message for upgrade displayed. But after clicking the yes button of the message box it is following the dialog sequence of first time install instead of Resume.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Upgrade is not following the sequence

Hello,

Indeed, when performing an upgrade to the default package, you are prompted with the First Time Install dialog sequence (major upgrade).

Only when upgrading an instance of the installed package you are prompted with the Resume dialog sequence (minor upgrade).

So, the encountered behavior is correct.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
fazeelk
Posts: 32
Joined: Wed Sep 10, 2014 5:15 am

Re: Upgrade is not following the sequence

Hi Dan

Actually I don't want to accept user inputs for all upgrade install. For all the upgrade has to follow the same sequence. Please let me know what I have to do to achieve these.
Also please let me know which property will set If I am choosing Maintain or upgrade an already installed instance.
Is it possible to display separate dialogs for fresh and major upgrade install based on this property?


I have tried patch install without changing the product code and by changing the version, but its throwing an error "Another version of this product is already intalled. Installation of this version cannot continue. To configure or remove the existing version of this product, use add/remove programs on the Control panel"

Also please let me know from which path I will get the selected instance name and installed location.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Upgrade is not following the sequence

Hello,
Actually I don't want to accept user inputs for all upgrade install. For all the upgrade has to follow the same sequence. Please let me know what I have to do to achieve these.
Since the FolderDlg is displayed during the First Time Install dialog sequence ( also when a major upgrade is performed), you can condition this dialog to be displayed only when no previous version are found. In order to achieve that, you can select the FolderDlg dialog from the Dialogs page and choose "Show only if..." option from its context menu. In the "Expression" field from the Edit Condition Dialog write NOT OLDPRODUCTS.

So, the FolderDlg will be displayed when no version of your application is found (the OLDPRODUCTS property is empty ) and it will not be displayed when performing an upgrade.
Also please let me know which property will set If I am choosing Maintain or upgrade an already installed instance.
An upgrade process can be detected by using two properties:
  • OLDPRODUCTS - this property is set in the upgrading MSI if the package found an older version installed on the target machine
  • UPGRADINGPRODUCTCODE - this property is set in the MSI which is being upgraded if the package is uninstalled by a newer version
When going through the Maintenance Mode the following condition is used: ( Installed AND REMOVE <> "ALL" AND AI_INSTALL_MODE <> "Remove" )
Is it possible to display separate dialogs for fresh and major upgrade install based on this property?
Yes, this can be done using the OLDPRODUCTS property. You can also take a look on the How do I conditionally show the "UpgradeDlg" dialog? article which may be useful to you.
I have tried patch install without changing the product code and by changing the version, but its throwing an error "Another version of this product is already intalled. Installation of this version cannot continue. To configure or remove the existing version of this product, use add/remove programs on the Control panel"
This is happening when you are using the same ProductCode because two products with the same ProductCode can not be installed on the same computer. Windows Installer will prevent this with that error.

Please keep in mind that Windows Installer allows you to upgrade an installation in multiple ways. The most important are:
- the automatic upgrade feature (the old package is uninstalled before the new one is installed)
- a patch

Each upgrade method requires a target package and an upgrade package. For the automatic upgrade feature the target and upgraded packages must have different Product Codes and different versions. For a patch, the packages must have the same Product Code and different versions.

Windows Installer will show the error you encountered if:
- the target and upgraded packages have the same Product Code and the same version, but different contents (for example: you created a package, you installed it, you modified its project, rebuilt the package and tried to install the new package without uninstalling the old one)
-the target and upgraded images have the same Product Code and different versions (for patches)
Also please let me know from which path I will get the selected instance name and installed location.
The property which contains the installation path is APPDIR. If the Use original installation path when upgrading option is enabled in the Upgrades page, the new package will use the installation path of the older version when upgrading. The ProductName property contains the name of the application being installed.
BY default, these properties are stored in the Registry during installation.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
fazeelk
Posts: 32
Joined: Wed Sep 10, 2014 5:15 am

Re: Upgrade is not following the sequence

Thanks Dan

Its working fine if we are allowing only single instance. But as I have to support the multiple instances I can't use NOT OLDPRODUCTS property because it will return true if any instance already exits. Also after the License agreement I have loaded different dialog based on this condition and When I checked the value of APPDIR its showing some different value instead of the install location of the instance that has been selected. Actually I have to read the config file changes and update the user defined AI properties by writing some custom action.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Upgrade is not following the sequence

You're welcome,

You can see my response on the Product Name and Install location property forum thread.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”