Prerequisite doesn't install during "modify" if it was removed by the user after the installation - Advanced Installer Community
ags17
Posts: 13
Joined: Tue Oct 04, 2016 7:53 am

Prerequisite doesn't install during "modify" if it was removed by the user after the installation

Hi guys!

I have an issue with (re)installation of prerequisites with "modify" option in installer.

I have a feature-based URL prerequisite (let it be "Putty" for demo purpose). And if this prerequisite was installed during the first installation, than it is not possible to reinstall it with "modify" or "repair" feature.
Here are the steps to reproduce:
1. Create demo project with one feature-based url prerequisite (https://tartarus.org/~simon/putty-snaps ... taller.msi)
2. Add appropriate install conditions: product version (by upgrade code {DCE70C63-8808-4646-B16B-A677BD298385}), minimum version 0.67.1204.0.
3. Install demo application (putty will be installed during the installation as prerequisite)
4. Uninstall Putty.
5. Try modify/repair demo application.
Expected result: Putty is installed.
Actual result: Putty isn't installed during modify/repair.
I've attached demo project.

Can I achieve desired behavior?
Attachments
Your Application.aip
(16.33 KiB) Downloaded 340 times
MihaiSorin
Posts: 2
Joined: Mon Sep 19, 2016 8:22 am

Re: Prerequisite doesn't install during "modify" if it was removed by the user after the installation

In the "Prerequisites" page, after you select your feature-based prerequisite, in the right pane, second tab ("Setup Files") you will find "Maintenance Command Lines". Here, when you check the "Repair using this command line:" the command line will be filled by default with the "/fomus {product-code-of-the-prerequisite}" line, causing to run prerequisite repair when the main installation is repaired. In the "New URL prerequisite" case (your case specific), the command line will not be filled by default. You will type here "/fomus {BD11056E-5951-49AC-B109-28D676FC1BF9}".
Good luck,
M
ags17
Posts: 13
Joined: Tue Oct 04, 2016 7:53 am

Re: Prerequisite doesn't install during "modify" if it was removed by the user after the installation

MihaiSorin wrote:In the "Prerequisites" page, after you select your feature-based prerequisite, in the right pane, second tab ("Setup Files") you will find "Maintenance Command Lines". Here, when you check the "Repair using this command line:" the command line will be filled by default with the "/fomus {product-code-of-the-prerequisite}" line, causing to run prerequisite repair when the main installation is repaired.
Good luck,
M
Thanks for answer. I've checked "repair with command line" and added "/fomus {BD11056E-5951-49AC-B109-28D676FC1BF9}" http://screencast.com/t/g4QVaIlqB .
Unfortunately, it doesn't help in case when prerequisite was removed from the system by user after installation of the application.
Could you attach fixed *aip file If I did it wrong and it works on your machine?

And even if it will work, still there is a question about "modify". I assume that prerequisite should be reinstalled during "modify" if it was removed from the system before.
MihaiSorin
Posts: 2
Joined: Mon Sep 19, 2016 8:22 am

Re: Prerequisite doesn't install during "modify" if it was removed by the user after the installation

Indeed, when prerequisite was removed from the system by user after installation of the application, at repair it will throw an error "This action is valid only for products that are currently installed". As a work-around you can check "Disable remove" in the "Product Details" page (or "Do not show in list", what suits you the best) in the prerequisite project.
M
ags17
Posts: 13
Joined: Tue Oct 04, 2016 7:53 am

Re: Prerequisite doesn't install during "modify" if it was removed by the user after the installation

MihaiSorin wrote:Indeed, when prerequisite was removed from the system by user after installation of the application, at repair it will throw an error "This action is valid only for products that are currently installed". As a work-around you can check "Disable remove" in the "Product Details" page (or "Do not show in list", what suits you the best) in the prerequisite project.
M
Unfortunately, Prerequisite is a third-party software and I can't forbid user to remove this software.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Prerequisite doesn't install during "modify" if it was removed by the user after the installation

Hi,

I'm afraid that reinstalling a prerequisite during the maintenance cannot be done because of an Advanced Installer limitation. I added this on our TODO list and we will try to add an improvement in a future version of Advanced Installer. Thank you for bringing it to our attention.

Meanwhile, you can add a message box that will be displayed on maintenance if that prerequisite was uninstalled to warn the user about this.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ags17
Posts: 13
Joined: Tue Oct 04, 2016 7:53 am

Re: Prerequisite doesn't install during "modify" if it was removed by the user after the installation

Eusebiu wrote: I'm afraid that reinstalling a prerequisite during the maintenance cannot be done because of an Advanced Installer limitation. I added this on our TODO list and we will try to add an improvement in a future version of Advanced Installer. Thank you for bringing it to our attention.

Meanwhile, you can add a message box that will be displayed on maintenance if that prerequisite was uninstalled to warn the user about this.
Ok, thanks for clarification.

Could you give me an example on how can I detect that prerequisite was installed during the first installation in order to take some actions (custom step via powershell).
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Prerequisite doesn't install during "modify" if it was removed by the user after the installation

Hi,

Each prerequisite has some install conditions that are evaluated to determine if it should be installed on the machine or if it is already installed. So, in order to see if your prerequisite was installed during the first installation, you can re-evaluate those condition by creating them in the "Search" page.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ags17
Posts: 13
Joined: Tue Oct 04, 2016 7:53 am

Re: Prerequisite doesn't install during "modify" if it was removed by the user after the installation

Eusebiu wrote:Hi,

Each prerequisite has some install conditions that are evaluated to determine if it should be installed on the machine or if it is already installed. So, in order to see if your prerequisite was installed during the first installation, you can re-evaluate those condition by creating them in the "Search" page.

Best regards,
Eusebiu
Oh, I meant how can I detect that prerequisite was installed during the first installation AND then uninstalled by the user? I can detect, that it isn't installed, but how can I check if it was previously installed (and it won't be reinstalled during modify/repair)? Because if this feature wasn't installed during the first installation, than it can be installed during modify (it works).
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Prerequisite doesn't install during "modify" if it was removed by the user after the installation

Hi,

In order to achieve this, you can create a new property in the "Install Parameters" page with the "Set persistent property" option checked. Then set that property to a specific value when the prerequisite is installed during the first installation and check its value during the maintenance.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”