agvinh
Posts: 5
Joined: Thu May 26, 2016 8:44 am

How to prevent the installer to auto remove the current product when run the same installer?

I built an installer with Advanced Installer 14.2.2.
Whenever I rebuild the installation package (without changing "Product Code", "Upgrade Code", "Version") and click launch installer again, the installer immediately remove the current installed product (which was installed before rebuild the package).
If I want to show a confirm dialog ("Existing versions of applications are found. Continuing this installer wizard shall uninstall the existing version first. Are you sure to continue?" with "Yes" and "No" buttons) before the installer automatically removes my installed product, how can I do that?
Please help. Thank you very much.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: How to prevent the installer to auto remove the current product when run the same installer?

Hello,

I'm afraid we do not have support for your requirements. Our current option only automatically removes the old flavor of your setup package without any notification.

I have forwarded your requirement to our development team and maybe they will consider such improvement in the future. In the meantime, could you give us more details about your requirement. Why would you need to stop the uninstall of the old setup flavor and the new installation? Can you give us a valid test case?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
agvinh
Posts: 5
Joined: Thu May 26, 2016 8:44 am

Re: How to prevent the installer to auto remove the current product when run the same installer?

Hi Daniel,

We develop a program and manage its version loke 1.0.0.1 ( 4 parts).
However, Advanced Installer only support 3 parts in the version (1.0.0).
Whenever we make a new build, we create another setup packages with the same version number (ex: 1.0.0 for build 1.0.0.1 and 1.0.0.2).
Our customers had already installed version 1.0.0.1 on their machine. Then we ask them to install the version 1.0.0.2.
Whenever, they launch the installer, the installer will very quickly remove the current installed software (version 1.0.0.1) without notify user about that. When the "Welcome" dialog displayed, the customers click "Cancel" button and found that the software was removed on their PC.
So they ask us to show a confirmation dialog to notify them before the installer remove the old program.

The test case as following:
1. Build the installer (Advanced Installer product version 1.0.0) with the assembly version 1.0.0.1.
2. Install it on the PC.
3. Build the installer (Advanced Installer product version 1.0.0) with the assembly version 1.0.0.2.
4. Launch the installer on the PC.
5. The installer will automatically remove the current installation without notifying user about this action nor allowing user to stop it.
6. When the "Welcome" dialog display, click "Cancel"
7. Check the PC and see that the product was removed. (didn't see in in "Add and Remove Programs")

Best regards,
Vinh Nguyen
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: How to prevent the installer to auto remove the current product when run the same installer?

Hello Vinh,

You can achieve this behavior if you apply the following settings in your setup project:

1. every time after changing the product version you should also generate a new ProductCode from "Product Details" page -> "Product IDs" tab
2. go to "Upgrades" page and check the "Customize Advanced Installer upgrade rules" option
3. in the below "Upgrades" section double click on the "OLDPRODUCTS" property row
4. in the "Edit Upgrade" tab of the popped up dialog click the "Include maximum version in range" option
5. rebuild and test again the setup installation scenario

Basically you should use the "Include maximum version in range" option and generate a new product code each time you change the product version.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
agvinh
Posts: 5
Joined: Thu May 26, 2016 8:44 am

Re: How to prevent the installer to auto remove the current product when run the same installer?

Thank you for your support.
I follow your advise and it works as what you said. However, it is not like what my customer want. He wants to show a confirmation dialog so that the user can choose either automatically remove the old version or cancel installing the new release.
Thank you anyway.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: How to prevent the installer to auto remove the current product when run the same installer?

Hello,

For this you could use our "Dialog Editor" feature. For instance you can display this info on a dialog using the OLDPROUCTS property as a condition and cancel the installation depending on the user choice.

Here is an approach you can use:

1. on "Dialogs" page you can create a new dialog after the "WelcomeDlg" dialog
2. right click on the new dialog and choose the "Show only if" option and set the following condition in the "Expression" field

Code: Select all

OLDPRODUCTS
3. on the new dialog add a static text control with the following text:

Code: Select all

An older version is already installed. Do you want to continue with the upgrade operation or abort it?
4. add a radio button control and set its "property Name" field in the right pane to RADIO_PROP
5. select the first radio button control and set its "Text" and "Value" fields in the right pane to Yes
6. select the second radio button control and set its "Text" and "Value" fields in the right pane to No
7. select the [Next] button and add the following event in its "Published Events" list
  • Control Event: Close the current dialog
    Argument: Exit
    Condition: RADIO_PROP = "No"
8. make sure you add the above event as the last event in "Published Events" list

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”