Zsolt Kollarits
Posts: 340
Joined: Fri May 29, 2015 10:36 am

Custom action is not launched

Wed Mar 06, 2019 2:46 pm

Dear Advanced Installer Support Team,

We just noticed an issue with our installer: the last dialog (ExitDialog) should execute - based on some conditions - a custom action (LaunchConfigWizzard) that should launch one of the .exe files (TheConfigWizard.exe) the installer installed.

Important to mention that this functionality was added to our .aip project years ago and it was working fine in all of our releases. To be honest it´s still working fine in average scenarios, but there is one scenario when TheConfiWizard.exe is not started. We just add a new prerequisite (.Net 4.7.2) for our installer, that prerequisite requires a reboot and this is the key here -> that is causing our problem. Please play around with the .exe I´ll send to you and do the following:

1. Take a machine which DOES NOT have .Net 4.7.2 installed on it.
2. Start our installer .exe
3. .Net 4.7.2 prereq will be offered for you for installation -> install it with our installer
4. After the prerequisite is successfully installed the installer will prompt you a small message in a dialog, it´s saying the .Net 4.7.2 requires a reboot. Just click on OK, so let the reboot occur.
5. After the reboot our installer will automatically be started/continued as per expected. Please click it through and on the last dialog enable the "Launch Confguration Wizard" checkbox. If that checkbox is enabled, our TheConfiWizard.exe should be triggered.
6. Confirm that our exe is not started.


Now if you play through the scenario on a PC where .Net 4.7.2 is pre-installed already (no reboot will occur in the middle of installation), you will see that our .exe will be started by the installer after ExitDialog.

Could you please advise us something?

Best regards,
Zsolt

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Custom action is not launched

Thu Mar 07, 2019 4:14 pm

Hello Zsolt,

We have started testing and investigating the scenario and we will get back to you as soon as we have an update.

Thank you for your patience on this.

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

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Custom action is not launched

Mon Mar 11, 2019 3:35 pm

Hello Zsolt,

Thank you for your patience on this.

After further investigation we found out that this issue occurs when:

1. a custom action is configured to run on [Finish] button
2. the custom action has the "Wait for custom action to finish before proceeding" and "Wait for return code at the end of the sequence" execution options disabled
3. the setup is resumed after a system reboot

Unfortunately we did not manage to find out any Windows Installer documented behavior for this scenario. For unknown reason the Windows Installer service fails to execute the custom action on [Finish] button with the following error:

Code: Select all

ERROR_CREATE_FAILED	1631	The Windows Installer service failed to start. Contact your support personnel.
A workaround for this scenario could be to define your finish custom action as an "Execute inline script code" custom action configured like this:
  • Action data: "[#FinishApp.exe]"
    Script type: *.VBS
    Content:

    Dim objShell
    Set objShell = CreateObject( "WScript.Shell" )
    objShell.Run(Session.Property("CustomActionData"))

    "Wait for custom action to finish before proceeding" checked
    "Wait for return code at the end of the sequence" checked
Hope this helped.

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

Zsolt Kollarits
Posts: 340
Joined: Fri May 29, 2015 10:36 am

Re: Custom action is not launched

Tue Mar 12, 2019 10:42 am

Hi Daniel,

I modified our .aip, re-created our .exe based and re-tested the whole scenario, but everything seems to be the same. In an email I´ll send over our new .aip file for you, could you please take a look at it?

Best regards,
Zsolt

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Custom action is not launched

Tue Mar 12, 2019 2:42 pm

Hello Zsolt,

There was my fault. I wrote wrong details. Please accept my apologies for that.

Firstly the "Wait for custom action to finish before proceeding" and "Wait for return code at the end of the sequence" execution options should be enabled (checked).

Secondly please enclose between quotes the file reference of your EXE app into "Action data" field ("[#FinishApp.exe]").

I have updated the details in my previous post too.

Hope this helps now.

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

Zsolt Kollarits
Posts: 340
Joined: Fri May 29, 2015 10:36 am

Re: Custom action is not launched

Wed Mar 13, 2019 3:27 pm

Hi Daniel,

Your new proposal works, thank you.

Best regards,
Zsolt

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Custom action is not launched

Thu Mar 14, 2019 10:28 am

You are always welcome Zsolt.

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

Return to “Common Problems”