Order of actions - 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!

grobin67
Posts: 15
Joined: Thu Nov 04, 2010 12:30 pm

Order of actions

I built and ran my first packaged install but its failing because it can't find the path for Application Folder. My installer should setup JRE and Tomcat, then find the path for Tomcat and put my app (a java war) into its /webapps directory.

So I setup a registry search for Tomcat that returns TOMCAT_PATH and use that to modify Application Folder using this:

[TOMCAT_PATH]\webapps

So how do I control the order that the installer works? There is no point the search executing until AFTER Tomcat has installed and BEFORE it tries to place my app into the \webapps directory.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Order of actions

Hello,
So how do I control the order that the installer works? There is no point the search executing until AFTER Tomcat has installed and BEFORE it tries to place my app into the \webapps directory.
Please note that Windows Installer has a chain of Standard Actions that correspond with each step of the installation process. After each standard action you can place a Custom Action that will personalize the package to meet your application's requirements.

To achieve what you need please set both JRE and Tomcat as global prerequisites (they will be installed before the main package).
Place a Property Set with Formatted custom action after AppSearch(the standard action that performs the searches in the Search page) in the InstallExecuteSequence. This custom action must set the APPDIR property with your search result property.

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
grobin67
Posts: 15
Joined: Thu Nov 04, 2010 12:30 pm

Re: Order of actions

Mihai,

thanks. I already had both Tomcat and JRA as global prereqs.

My problem now is if I go to "Custom Actions>InstallExecuteSequence>New Custom Action", all the options in the menu layer are greyed out including "Property Set with Formatted". I notice in the help page it mentions that you have to add files to the project first, but I have done that and placed my 'war' file in there.

Any idea why I can't add this?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Order of actions

Hi,

This happens because you probably right-clicked on the "InstallExecuteSequence" element from the tree. To add a custom action you need to right click on one of the standard action viewable or
one of the custom actions that are already in the sequence.

This will make the custom action to be added directly after the custom/standard action selected.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
grobin67
Posts: 15
Joined: Thu Nov 04, 2010 12:30 pm

Re: Order of actions

Under "InstallExecuteSequence" I see 4 actions:

Uninstall
Rollback
Install
Commit

I can add a custom action by right-clicking on either of these or on the "UI Custom Actions" node below. So which one do I add this to? Which one of these will occur after my Custom Search?

Sorry but I am somewhat confused by this.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Order of actions

Hello,

Please follow these steps:
  • in the "Custom Actions" page right click on any item in the "InstallExecuteSequence" tree
  • from the context menu choose "Show Standard Action" -> "Before Initialization" -> "AppSearch"
  • right click on the just added "AppSearch" standard action in the "InstallExecuteSequence"
  • from its context menu choose "New Custom Action" -> "Property Set with Formatted"
Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
grobin67
Posts: 15
Joined: Thu Nov 04, 2010 12:30 pm

Re: Order of actions

Thanks for that, I got everything setup, built another installer but I am still getting the same problem, it terminates with "Could not access network location /webapps", which mean the pre-requisites are still not getting done first i.e. tomcat has not been installed before the custom search runs.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Order of actions

Hello,

Please try adding the "Property Set with Formatted" custom action in the "InstallUISequence" as well as in the "InstallExecuteSequence".

Regards,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
grobin67
Posts: 15
Joined: Thu Nov 04, 2010 12:30 pm

Re: Order of actions

That seems to work, thanks a lot!

Return to “Common Problems”