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!

zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Conditional Install location

I am very new to Advanced Installer so I apologise if this has been covered elsewhere or is obvious.

I am trying to set up an installer that looks in the registry for the install location. It is possible that the install location will exist in one or more locations. I would like to look in the first location, if an entry is found then use that otherwise try the other location. If neither are found then complain that the prerequisite software was not found.

I can set up properties and I have been able to use one a property as the install location but I am not able to use them conditionally as I described above.

Any help really appreciated.

Thanks

David
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Conditional Install location

Hello David and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.,

I assume that you want to search on the target machine for certain prerequisite software that are required by your application.

In order to add a prerequisite you can take a look on the Add prerequisite article which may be useful.
Please note that on the "Install condition" tab you can add multiple install conditions for your prerequisite to be installed or not.
You can also test the related conditions using the [Test] button.

Please let us know if that helped otherwise give us more details about your specific scenario.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Re: Conditional Install location

Thanks for your help. This is somewhat correct. There is a prerequisite third party software but more importantly is the requirement that the software is installed into a specific directory of that software. The software can specify one of two locations and this is what I am trying to determine.

Thanks


David
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Conditional Install location

Hi David,

First of all I apologize I misunderstood your specific scenario.

In order to achieve that you can go in the “Search” page and use a custom search, where the object of your search can be either a component, registry key, folder, a file etc.

In order to search for a registry entrance you can go in the “Search” page and use the [New Search Wizard] toolbar button and follow step-by-step wizard directions.
The result of your search will be stored in a public property(e.g. REG1_PATH ).

Add a another registry search (e.g. REG2_PATH ) for the second search location.

Then you can go in the “Custom Actions” page and add two “Set installer property” predefined custom actions with sequence.

For the first custom action you can edit its properties like:
Property – field: FINAL_PATH this property will further serve to the launch condition
Value – field: [REG1_PATH] the value of the first registry search
Condition – field: REG1_PATH it will be only executed if there was found in the first registry location

For the second custom action you can edit its properties like:
Property – field: FINAL_PATH this property will further serve to the launch condition
Value – field: [REG2_PATH] the value of the second registry search
Condition – field: ( NOT REG1_PATH ) AND REG2_PATH it will only be executed if was nothing found in the first registry location and there was found in the the second registry location

Also you should add these two custom actions in the “Wizard Dialogs Stage” after the "Searches" stage using a “drag-and-drop” operation while the “SHIFT” key is pressed.

You can go now in the “Launch Conditions” page and create a launch condition.
In the “Condition” field you can type FINAL_PATH and in the “Description” field you can have a custom message(e.g. “Prerequisite software was not found!”).

Please let us know if that helped otherwise give us more details.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Re: Conditional Install location

Sorry for the delay in responding to this and thanks a lot for your great answer.

I have managed to do the first part and have created the custom actions.

However I am not really sure what you mean by
Also you should add these two custom actions in the “Wizard Dialogs Stage” after the "Searches" stage using a “drag-and-drop” operation while the “SHIFT” key is pressed.
I can see the two custom actions and I can see the search area under the custom dialogs stage. However I don't see a way of dragging the to that area. I can select one, press shift but it does not move.

Thanks

David
zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Re: Conditional Install location

Sorry, I didn't see that the custom actions appeared below in the Install Execution Stage. I was able to copy them (using shift and dragging and dropping them) under the searches too.

David
zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Re: Conditional Install location

I have now completed all the stages that you mention. However when I try to add a folder for the final install path I do not see my my final path property in the list of available properties. I see the other two (REG1_PATH and REG2_PATH) but not the final path.

Thanks

David
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Conditional Install location

Hello David,

Can you please create your property (FINAL_PATH) in the "Install Parameters" page and see if the behavior still persist?

Please let us know if you need any help.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Re: Conditional Install location

Thank you that seems to have worked.

David
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Conditional Install location

Hi David,

I'm glad you got this working.

If you have other questions, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”