Hell Jan,
1. Will they be executed in the order they are listed in AI (given they have the same execution time set) or will it be in random order? See image below.
Yes, the custom actions are executed in the order they are displayed.
2. If I select execution time to be "Immediately". Will the custom action be executed immediately after the user presses the "Install" button in the verify dialog? Will this also happen before the system is being modified and files are copied to the installation folder?
The immediate actions can be used anywhere in the Install UI Sequence and in the Execute Sequence, but for the second one there is a phase where immediate actions can no longer be used. This happens when the installation script is triggered. The immediate actions should not modify the target machine since those changes cannot be rolled back.
When you press the "Install" button, the transition from
"Wizard Dialogs Stage" to
"Install Execution Stage" is made. If you want your immediate custom action to take place when the user presses the "Install" button, you can simply schedule it in the "Install Execution Stage", before "Searches" action group.
Hope this helps.
All the best,
Catalin