Introduction
This is a very high-level introduction on what is going on when we initiate an installation.
Client and Server processes
The main components of Windows Installer engine are msiexec.exe and msi.dll located in the %SystemRoot%\System32 folder. If you want to know the version of MSI installed on your machine, check the version number of either of those two files.
On Windows 9x Windows Installer Engine is implemented as client process, whereas on Windows NT 4.0 and up it has two parts - client process and Windows service. Because Windows 9x are old systems and barely in use anymore, I will focus on the server implementation of Windows Installer Engine.
Remember: On Windows 9x operating systems there is no server process. The whole installation is done in the client process.
Remember: When we launch Windows Installer engine (by running msiexec.exe) we are launching the client process. Client process will launch the Windows service process.
Client process is running under credentials of the user who started up the installation process. Server process is running under the LocalSystem account which is generally a lot more powerful than user's account.
Three types of installation
Windows Installer engine supports three types of installation:
Advertisement switch (/j) stands for just-in-time and has two optional modifiers. You can use either one of them:
Depending on the passed switch, Windows Installer engine will start executing INSTALL, ADMIN, or ADVERTISE top-level standard action.
User interface levels
Windows Installer supports four user interface levels:
Sequence tables
There are two types of sequence tables which contain the list of actions Windows Installer runs during installation:
Each type of installation has its own pair of sequence tables:
When user interface level is Full or Reduced, Windows Installer engine will start with processing actions from the UI sequence table and continue with Execute sequence table's actions.
When user interface level is Basic or None, UI sequence table will be skipped and installation will be started with executing actions from the Execute sequence table.
Two phases of installation
There are two phases during installation:
Remember: Acquisition phase is also known as Immediate phase when it comes to custom actions. All Immediate custom actions are running in the context of the user performing the installation. Immediate custom actions must not change the system. Execution phase is also known as Deferred phase when it comes to custom actions. Deferred custom actions usually run with elevated privileges unless they are not impersonated. Impersonated deferred custom actions are running in the context of the user performing the installation.
Installation workflow