MattRenaud
Posts: 7
Joined: Fri Aug 27, 2021 1:07 pm

Pre-Requisite's "Return Value" not Saving

Fri Sep 17, 2021 2:48 pm

Hello!

We have run into an issue which is not making any sense. This used to work on previous versions of AI but since we upgraded to the latest version, it no longer works.
This is related to viewtopic.php?t=45174

We have a pre-requisite that happens on Pre-Install. We save the pre-requisite return value in a property.
(https://www.advancedinstaller.com/user- ... files.html).

Then at the end of the installation process (Finish Dialogs Stage) we execute an "Msiexec.exe Command Line" where we repair the pre-requisite.
We add the variable saved from the Pre-Requisite Variable as a Condition (under Dialogs Stage Condition). Basically stating that only do the repair if an upgrade was performed.

However the condition is always returning as false and never performing the repair. Tried without the Condition and it works fine (so we know that the command line is working fine). Is this a known bug, or are we doing something weird? I couldn't find any topic relating to this.
Attachments
Repair_End_of_Installation.png
How our msi exe command line script looks like
Repair_End_of_Installation.png (25.8KiB)Viewed 20952 times
Pre-Requisite.png
Pre-Requisite page where we save return value to a variable
Pre-Requisite.png (19KiB)Viewed 20952 times

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Pre-Requisite's "Return Value" not Saving

Mon Sep 20, 2021 3:06 pm

Hello Matt,

This is quite strange, indeed.

I have just ran a test and everything seemed to be working as expected on my end, the custom action was executed as expected.

If possible, could you please create a sample project that reproduces this and forward it to me by e-mail at support at advancedinstaller dot com so I can further investigate this? Here would be the files needed:

- the .AIP file used to build the project

- a download link for the setup project

- a download link for the prerequisite

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

MattRenaud
Posts: 7
Joined: Fri Aug 27, 2021 1:07 pm

Re: Pre-Requisite's "Return Value" not Saving

Wed Sep 22, 2021 8:59 am

Morning Catalin,

I created a simple project where I was able to reproduce the problem, eventually. In the process of creating it, I figured out what the problem was.
On our AI project, we have Never use Enhanced User Interface (under Themes -> Settings ) .
As soon as I turn this on to Only on Install, then it executes our custom action with its Condition (this fixes it both on the small test AI I created and our main AI where the problem is).
I identified this by the new ExtUI="true" code in the AI file.

I would like to relay to our team why this change fixes it.
Is there a specific reason why this feature would affect the custom actions? I couldn't find any information regarding this on the Enhanced UI section https://www.advancedinstaller.com/user- ... ed-ui.html

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Pre-Requisite's "Return Value" not Saving

Thu Sep 23, 2021 11:54 am

Hello Matt,

I am glad you found the culprit and that it works as expected now.

This is quite strange, as I do not recall using the Enhanced User Interface option in my sample project.

Please forward me the following resources:

- a copy of the .AIP file (sample)

- a download link for the setup

by e-mail at support at advancedinstaller dot com so I can further investigate this on my end.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

MattRenaud
Posts: 7
Joined: Fri Aug 27, 2021 1:07 pm

Re: Pre-Requisite's "Return Value" not Saving

Thu Sep 23, 2021 12:47 pm

Hi Catalin,

Unfortunately enabling Enhanced User Interface is causing more issues than its solving (Variable values no longer persisting).
I have emailed the details you requested along with more information to the problem at hand.

Regards,
Matt

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Pre-Requisite's "Return Value" not Saving

Tue Sep 28, 2021 4:16 pm

Hello Matt,
I have emailed the details you requested along with more information to the problem at hand.
Unforunately, it looks like the email was not sent (I did not receive any email from your address).

Could you please try to resend it?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Pre-Requisite's "Return Value" not Saving

Thu Sep 30, 2021 10:43 am

Hello Matt,

Please disregard my last thread, I have found your email.

I'm working on it as we speak and will followup here once I'm done.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Pre-Requisite's "Return Value" not Saving

Thu Sep 30, 2021 1:39 pm

Hello Matt,

As promised, here is my followup to this issue.

It seems that, without the EUI, the setup can not pass the property to the MSI.

I can not say for sure if this is a bug or simply a corner case which our development team did not consider.

To work this around, you can declare the property in "Properties" page and give it a value, e.g.:
TempVar.png
TempVar.png (33.85KiB)Viewed 19075 times

After doing so, however, the condition you currently use for your custom action will always be true, i.e.: TEMP_VAR2, because this basically means "execute the custom action if TEMP_VAR2 property exists" and, since we defined it, the custom action will always be executed.

To avoid this, we will need to be a little bit more specific with our condition, e.g.:

Code: Select all

TEMP_VAR2 = "0"
This way, we will always execute the custom action if the property is "0" (meaning that the prerequisite was installed).

I have also forwarded this scenario to our development team so we can further investigate this and try to find a solution.

I will update this thread as soon as this will be fixed.

Hope the workaround will help!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

MattRenaud
Posts: 7
Joined: Fri Aug 27, 2021 1:07 pm

Re: Pre-Requisite's "Return Value" not Saving

Mon Oct 04, 2021 9:54 am

Hi Catalin,

Thank you very much for the feedback.
We implemented the workaround you described above and we got the desired results.
This looks like the solution for now. We will continue testing, but it looks to be working without any issues.

Regards,
Matt

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Pre-Requisite's "Return Value" not Saving

Tue Oct 05, 2021 7:42 am

You are always welcome, Matt!

I am happy to hear everything works as expected now.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Pre-Requisite's "Return Value" not Saving

Wed Nov 24, 2021 5:04 pm

Hello Matt,

This has been fixed in version 18.9 of Advanced Installer, released on November 23rd, 2021.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”