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!

sonda
Posts: 103
Joined: Mon Apr 30, 2018 12:01 pm

Ruining custom action before start

I want to run custom action before gui is displayed to set property, but script is not run an property is not set m'i missing something when setting the custom script to execute
Attachments
custom.png
custom.png (8.75 KiB) Viewed 6272 times
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Ruining custom action before start

Hello,

This should be working.

You have scheduled the custom action correctly, as far as I can see.

I have tested this and it worked setting / getting property value at that stage.

In order for me to further investigate this, could you please let me know what the content of your custom action is?

If it is easier for you, you can send me a copy of your .AIP file by e-mail at support at advancedinstaller dot com and I will further investigate this.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sonda
Posts: 103
Joined: Mon Apr 30, 2018 12:01 pm

Re: Ruining custom action before start

I have send you some test .aip where execution of the script does not occur. Cant figure why. If i start new project from scratch it's ok, bit in editing file not running, something i have messed up with .aip

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

Re: Ruining custom action before start

Hello,

Thank you for the provided .AIP file.

I've had a look over your sent file, but honestly I am not quite sure I understand what the problem is.

When you say the property is not set, do you mean that you get the launch condition description even if you are trying to set the property (to basically validate the launch condition)?

If the above is not the case, could you please give me some more details about what the problem is (e.g. how did you check if the property was set or not)?

Looking forward to hearing from you.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sonda
Posts: 103
Joined: Mon Apr 30, 2018 12:01 pm

Re: Ruining custom action before start

Hi Thanks for reply and if if you see in the .aip file i set one property (SERVICE_EXISTS_PROP ) on beginning andn initialise to 0,

err1_.png
err1_.png (4.97 KiB) Viewed 6254 times

after that i add custom powershell script that is runned before gui and that script should set property to (SERVICE_EXISTS_PROP =1)
err-2a.png
err-2a.png (38.03 KiB) Viewed 6254 times

and at last there is launch condition that check if the property is set to 1 (this should be 1 because custom script should set it, and should be executed before launch check script) and should not be triggered, but if you try to run aip will see that launch condition is triggered and installation not continue and thats the problem, like custom script is not executed and property is not set to 1

err2.png
err2.png (15.68 KiB) Viewed 6254 times
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Ruining custom action before start

Hello,

Thank you for your followup on this. It is clear to me now what your issue is.

Well, this is happening due to the fact that the launch condition is checked long time before your custom action sets the property.

Please keep in mind that your custom action is scheduled in the "Wizard Dialogs Stage" of the main installation. Since your package is a .EXE and you have pre-install prerequisites, an additional stage is added - called BootstrapperUISequence (basically the Bootstrapper UI).

In the "Prerequisites" page, you have the "Check launch conditions before searching for prerequisites" option enabled. That makes the launch conditions to be checked before even launching the pre-install UI.

In order to avoid this behavior, you can uncheck the above option. However, this might bring some trouble itself - for instance, the prerequisite could be installed and then the launch condition would be validated as false, forcing the main installer to fail.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sonda
Posts: 103
Joined: Mon Apr 30, 2018 12:01 pm

Re: Ruining custom action before start

Thank you very much for informative info
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Ruining custom action before start

You are always welcome!

Glad the info was helpful to you.

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

Return to “Building Installers”