Wrong execution order - Advanced Installer Community
nirs
Posts: 42
Joined: Wed Aug 13, 2014 2:46 pm

Wrong execution order

Hi,

I added a custom action 'Launch File'.
The action is after 'Add resources' and before 'Finish Execution'.
The execution time is deferred.
The file that I launch is included in the 'Files and Folders'.

When I execute the installation I see on the logs that first the launched file operation is being executed, later the file is copied to its location, what obviously cause a failure to my installation.
Do you have any idea?

Thanks.
Nir
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Wrong execution order

Hello Nir,

This shouldn't happen as long as the custom action is configured to execute as deferred. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nirs
Posts: 42
Joined: Wed Aug 13, 2014 2:46 pm

Re: Wrong execution order

Thanks Daniel.

I was isolating the problem and reliazied that the 'Launch File' was not actually executed (the verbose.log is missleading)

What I actually do is:
1) Copy the file httpd.exe to target location.
2) Execute httpd.exe –k install
3) Start the service Apace2.2 (that should be configured in step #2)

Step #3 was implemented in 'Services' dialog, using 'Control Operations'.
It seems like step #3 is being executed before step #2.
Can you please advice how do I set the execution order the step #3.

Thanks.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Wrong execution order

Hello,

In order to achieve what you want you can add the "httpd.exe" file as a temporary file in "Files and Folders" page. Then, you can simply schedule the custom action which execute "httpd.exe –k install" before "Install Execute Sequence -> Add Resources" action group.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nirs
Posts: 42
Joined: Wed Aug 13, 2014 2:46 pm

Re: Wrong execution order

Thanks Daniel for the response.
You didn't advise about how do i oraganize the schedule of the service start.
I do able to run httpd.exe -k install, but it is being executed after the start service operation.
How do I execute httpd.exe -k install and latewr the start service?

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

Re: Wrong execution order

Hello,

The service start operation can be configured from "Services" page. The service will be started during the "Install Execute Sequence -> Add Resources -> StartServices" standard action. Therefore, in order to launch the "httpd.exe -k install" using a custom action before the start services operation, you should make sure the above custom action is scheduled before the "Install Execute Sequence -> Add Resources" actions group.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nirs
Posts: 42
Joined: Wed Aug 13, 2014 2:46 pm

Re: Wrong execution order

OK.
So if the httpd.exe is a file that deployed during my installation. Hence the httpd.exe -k install can be executed only after httpd.exe is deployed, what should I do?
Is there a custom action for starting a service?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Wrong execution order

Hello,

If the "httpd.exe" file is added as a regular file in "Files and Folders" page to be installed, then this file will be copied on target machine at install time during the "Install Execute Sequence -> Add Resources -> InstallFiles" standard action. Therefore, you should move your custom action to run right after the "Install Execute Sequence -> Add Resources -> InstallFiles" standard action.

Also, since during installation sequence the "Install Execute Sequence -> Add Resources -> StartServices" standard action will be executed after the "InstallFiles" standard action your scenario is possible. Just make sure you place your custom action after the "Install Execute Sequence -> Add Resources -> InstallFiles" standard action and before the "Install Execute Sequence -> Add Resources -> StartServices" standard action.

Let us know if this helped.

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

Return to “Common Problems”