Windows Installer Editor Reference
444
Using MSI Script
See
Using the Custom Action Location Tab
on page 488.
6. From Sequence, select a sequence.
7. In the list box of actions, select an action and click Add.
The action is added to the sequence, below the action you selected.
If you are in a merge module, the layout of the Location tab is different.
See
Using the Custom Action Location Tab for Merge Modules
on page 489.
8. Select other sequences and add the action to them.
9. Click OK.
About Installation Sequences
Installation sequences are represented by tabs below the Installation Sequence
section in MSI Script. Windows Installer has two main types of sequences: User
Interface and Execute. The User Interface sequence, which is executed at the beginning
of installation, gathers system information, displays dialog boxes to the end user, and
records end user choices. It is suppressed during silent installations.
The Execute sequence installs the application and makes changes to the system. During
installation, Windows Installer first goes through each action in the Execute sequence
and builds an internal installation script to follow. You cannot see or access this internal
script. This first pass is referred to as immediate mode and is represented by the
Execute Immediate tab. After it creates the internal installation script, it runs the script
it created, performing the actions that change the system. The second pass is referred
to as deferred mode, and encompasses all the actions between InstallInitialize and
InstallFinalize. It is represented by the Execute Deferred tab. This makes it easier to
specify in which mode to run an action.
For information on where to place a custom action, see
Guidelines for Custom Action
Location
on page 454.
When Windows Installer generates the installation script, it generates a rollback script
that will undo the actions of the installation script. The rollback script is executed if the
installation is canceled or is unsuccessful, and is also run in deferred mode. Although
you cannot view or edit the rollback script, you can specify that custom actions you add
be added to it; use the In-Script Options field on the Properties tab of the custom
action details dialog box.
On a Windows operating system, Windows Installer runs as a service, which is
registered in the Services control panel. When an .MSI is run, it is run by the service.
The Windows Installer service can run with elevated privileges based on policies, and the
Windows Installer database runs with the current user’s privileges. When you add
custom actions, you can specify whether they should be run with elevated privileges
(system context) or with user privileges (user context). Set privileges to user context or
system context in the In-Script Options field on the Properties tab of the custom
action details dialog box.
For information on Windows Installer sequence tables, see Using a Sequence Table in
the Windows Installer SDK Help.
Finding Text in MSI Script
Press Ctrl+F and enter a text string to find lines that contain that string. All installation
sequences are searched, and you can select which installation mode to search.