Install directory = search result? - 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!

mpdv
Posts: 17
Joined: Mon Feb 05, 2007 6:39 pm

Install directory = search result?

Hi,

Is it possible to run 2 searches for registry values (which contains paths) and create a custom action which compares these two search results and sets the install path to this one which where not empty?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

This can be done by using custom actions. First you set up the two searches which will return the properties RESULT_PROPERTY1 and RESULT_PROPERTY2. Then in the "Custom Actions" page you create the following custom actions:
- under "InstallUISequence" folder you add the "AppSearch" and "CostFinalize" standard actions;
- under the "AppSearch" folder you create two "Property set with Formatted" custom actions;
- the first one will look like this:

Code: Select all

Property Name:    RESULT
Formatted Text:    [RESULT_PROPERTY1]
.....
Expression:    NOT RESULT_PROPERTY2 (this one is in the "Execution Condition" section)
- the second one looks like this:

Code: Select all

Property Name:    RESULT
Formatted Text:    [RESULT_PROPERTY2]
.....
Expression:    NOT RESULT_PROPERTY1 (this one is in the "Execution Condition" section)
- under the "CostFinalize" folder you create a "Directory set with Formatted" custom action which looks like this:

Code: Select all

Directory:    APPDIR
Formatted Text:      [RESULT]
Now drag and drop while pressing the "Shift" key these custom actions to the same folders (which you must add) under the "InstallExecuteSequence".

Basically, using these custom actions, you compare the properties which resulted from the search (RESULT_PROPERTY1 and RESULT_PROPERTY2), and you put the non-empty one in the RESULT property. This last property will define the installation path.

Regards,
cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”