how can I sort "Custom Launch Conditions"? - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

how can I sort "Custom Launch Conditions"?

Using AI 7.7:
in "Launch Conditions" -> "Custom Launch Conditions" you can add your custom conditions, however, I would like to sort them.
But I don't see how this can be done.
This forces me to create complicated conditions on the "Custom Launch Conditions" so manually create this order that I want... and it's NOT fun.

What can be done?

Many thanks, Dashut.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: how can I sort "Custom Launch Conditions"?

Hi Dashut,

Please note that Windows Installer evaluates launch conditions in a random order. If you want to run checks in a specific order, you can try using a custom action. This custom action can return 0 for success or 1602 to stop the installation.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

Re: how can I sort "Custom Launch Conditions"?

What can I say "go go Microsoft!".
So you say to create a custom action: where to run it?
Dashut.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: how can I sort "Custom Launch Conditions"?

Hi Dashut,

You can schedule the custom action at the beginning of your installation. For example after "InstallUISequence" -> "Launch Conditions". You should also share the custom action with InstallExecuteSequence so it runs for silents installs (drag the custom action over "InstallExecuteSequence" -> "Launch Conditions" while Shift key is pressed).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

Re: how can I sort "Custom Launch Conditions"?

You're right, however, these conditions will be run only after you have pressed the "install" button.
The "Custom Launch Conditions" are validated before the welcome page: so you don't get to go through all the dialog pages (next/next/next) and then press "install": only to find out that some launch condition wasn't met...

The only way I can see right now to avoid this, is to try and make complex conditions, or have all of the things I want to check in one "big" custom action...
Maybe the solution should have been that AdvancedInstaller runs a custom action for me, that receives all of those conditions: this way you can create the order you want and not depend on Microsoft...

Okay, thanks for all, Dashut.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: how can I sort "Custom Launch Conditions"?

Hi,

This is why I mentioned both sequences:

Code: Select all

InstallUISequence -> Launch Conditions
InstallExecuteSequence -> Launch Conditions
The custom action in InstallUISequence is executed before WelcomeDlg is shown.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dashut
Posts: 142
Joined: Tue May 04, 2010 4:41 pm

Re: how can I sort "Custom Launch Conditions"?

That's absolutely true! Thanks, Dashut.

Return to “Common Problems”