Hello Ravi,
In what regards the execution of the scripts, they are executed in the order they appear in the tree (top-down).
In what regards your second question, that can be achieved through an SQL Query. Now let me please explain the main differences between an SQL Script and an SQL Query.
- SQL Scripts are only executed during the deferred execution time (during the "Install Execution Stage" phase). This is the reason why they are executed in the order they appear in the tree.
- SQL Queries can be executed whenever you want them to be executed. An SQL query can be triggered by scheduling the associated custom action in the install execution stage or by directly invoking the custom action with a published event.
Aside from the differences presented above, another main difference is the fact that the SQL Query can also save the results of the interrogation in a property (exactly as you need), while an SQL Script can not do that.
For more information about SQL Queries, you can have a look on our
"SQL Query Tab" article which I think you may find useful.
Also, the results are usually stored into a ComboBox or a ListBox, so I think you may find useful the
"Working with Windows Installer ComboBox and ListBox controls" article as well.
Hope this helps.
Kind regards,
Catalin