ihsiu1
Posts: 17
Joined: Tue Feb 21, 2006 4:36 pm

What's the exact sequence of the custom action?

Hi,

What's the exact sequence of the custom action? I'm confused.
For example, I found out the sequence of the following test is
UI Starting, Install, Commit, ExecuteAction. What's the rule?

InstallUISdequence
UI Starting
script_stop1
ExecuteAction
script_stop4
InstallExectueSeqauence
Install
script_stop2
Commit
script_stop3

Thanks!
ihsiu
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

The "InstallUISequence" is executed first (unless a silent install is performed). In this sequence you can use only immediate Custom Actions. The "ExecuteAction" Standard Action (from "InstallUISequence") launches the "InstallExecuteSequence" as a sub procedure. After all the Actions (Standard or Custom) from the "InstallExecuteSequence" have completed, the installer returns to the "InstallUISequence" and executes any Custom Actions scheduled on the "ExecuteAction" Standard Action. Then it displays the "Installation Complete" dialog.

The part of the "InstallExecuteSquence" between "InstallInitialize" and "InstallFinalize" is processed in 2 phases. First the installer goes through the Actions (Standard and Custom) and notes them down in an installation script. Then it goes through the script and actually executes the commands. This second phase is where the target computer is modified, i.e. files are copied, registry entries are written, etc.

While the installer builds the script, only Immediate Execution Custom Actions are actually executed. All other actions (Standard Actions like "InstallFiles" and Deferred Execution Custom Actions) are only noted in the script.

When the script is built ("InstallFinalize" is reached) the installer starts to execute the script. During this phase the Deferred Execution Custom Actions are executed in the order they have been written to the script and only if their condition was true at the time the script was built.

This is just a short overview of the installation process.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
ihsiu1
Posts: 17
Joined: Tue Feb 21, 2006 4:36 pm

Hi Denis,

Thanks a lot :-)

Am I right that my custom actions at InstallFinalize will be executed when the target machine has been modified?

Is there any reference for more detailed info about this topic? Will the purchased version contains detailed help?

Thanks again,
ihsiu
Mike
Posts: 292
Joined: Wed Jun 01, 2005 10:50 am
Location: Craiova, Romania
Contact: Website

Hi,

Yes, you are right, this stage occurs after the target machine has been modified.

The purchased version contains the same documentation as the trial version. This kind of info can be obtained from Microsoft's Platform SDK Windows Installer section.

This can be downloaded from:
http://www.microsoft.com/downloads/deta ... laylang=en

or you can use the online version:
http://msdn.microsoft.com/library/defau ... t_page.asp

For information about standard action, please visit:
http://msdn.microsoft.com/library/defau ... erence.asp

Regards,
Mihai
Mihai Bobaru
Advanced Installer Team
http://www.advancedinstaller.com
mbearden
Posts: 8
Joined: Tue Jan 30, 2007 11:20 pm
Location: Atlanta, GA

The post above (answer from Caphyon) suggested to the person asking about the sequence of Standard Actions (which I am also curious about) that they should go to this MSDN reference site:

http://msdn.microsoft.com/library/defau ... erence.asp

which does list all the actions, but only alphabetically, not by order of execution. In fact, the related MSDN page "Action Execution Order" (http://msdn2.microsoft.com/en-us/library/aa367517.aspx) says that
The order of action execution is determined by the sequence of actions that have been authored into the sequence tables and by the order in which the installer runs the sequence tables.
Since Advanced Installer defines the sequence tables (right?) then it seems that Caphyon should be including in the documentation what is the sequence of Standard Actions. Am I missing something? I am also wondering, and confused, about the sequence of installation actions.

Thanks for any further details you can provide about what action execution sequence Advanced Installer builds into the installer.
mbearden
Posts: 8
Joined: Tue Jan 30, 2007 11:20 pm
Location: Atlanta, GA

I can partially answer my own question from above, after using the logging mode of misexec.exe to study the action execution sequence...

The execution order of the Standard Actions is the one shown in the drop-down menu tree of the Advanced Installer interface, on the Custom Actions panel. It's that simple - though the documentation isn't explicit about this, I guess Caphyon thinks it is so obvious.

I was confused for a while about the "deferment" of actions. Actions, by default, seem to be "deferred" until InstallFinalize unless they're custom actions with mode set to "Immediate" rather than "Deferred". Then, within the InstallFinalize phase, all the deferred actions are performed in the same order as they were "accumulated" during the phases, performed in the order shown in the AI GUI's Custom Actions panel.

Return to “Common Problems”