Windows installation and Sequences Part 1

I found a lot of  good information about windows installer in context  of install shield.  From this information set, I have captured windows installer information alone. Thanks to you install shield guys to help me have a clear understanding  about windows installer. This is theoretical concept so that people developing installers also understand the theory and not just become tool expert, without understanding of what happens under the hood. it would help to look back later in years.

A Windows Installer installation program does not contain an explicit script, but instead the installation behavior is defined by the ordering of standard and custom actions into installation sequences. The ordering of standard behavior and custom actions are represented in MSI database format. The order of actions appearing in the sequences determines the order in which your installer performs changes on the target system. An understanding of sequences and actions will help you avoid common problems with the behavior of your installation project.

Windows installer supports three type of installations normal installations, administrative installations and advertised installations. in each of the installations, each of these installation types is represented by a top-level sequence. You can inspect and manipulate these top-level sequences in the Custom Actions and reorder the execution order of Sequences. Sequences are ordered lists of actions, where an action
corresponds to one operation performed by the installation.

Each of the top-level sequences is divided into two subsequences, called the User Interface (UI) sequence and the Execute sequence.The UI sequence displays dialog boxes to the user and queries the target system, and the Execute sequence makes changes to the target system. During a silent or reduced-UI installation, only the Execute sequence is performed; during a test-mode installation, only the UI sequence is performed. (The UI sequence is sometimes called the client process, and the Execute sequence is sometimes called the server process.). The User Interface sequence and the Execute sequence run in different processes. The two processes communicate using public properties.

For a normal installation, these sequences are represented by the MSI database tables InstallUISequence and InstallExecuteSequence. (The tables used for the advertisement and administration sequences are called AdvtUISequence, AdvtExecuteSequence, AdminUISequence,
and AdminExecuteSequence.)

Each action is represented by a record in one of the sequence tables (InstallUISequence, InstallExecuteSequence, and so forth). Each record in the sequence tables contains Action,
Condition, and Sequence fields. In general, actions run in order of ascending Sequence number. (Rollback actions run in the opposite order.)

The overall flow of a typical installation is as follows:
1. Windows Installer starts the installation with the first action in the User Interface sequence with a nonnegative sequence number.
2. Actions and dialog boxes in the UI sequence are executed in ascending sequence number until the modeless SetupProgress dialog box is displayed, followed by the ExecuteAction action, which begins
the Execute sequence.
3. Next, the actions in the Execute sequence are performed in order of ascending sequence number. (As described in the following section, there are two passes through part of the Execute sequence, called immediate mode and deferred mode.)
4. When the Execute sequence is complete, control returns to the UI sequence: the SetupProgress dialog box is closed, then the appropriate “setup complete” dialog box (with a negative sequence number) is displayed.