The Advanced Windows Installer Using InstallShield
course provides you with a solid understanding of
advanced techniques for customizing the appearance and
behavior of your installation program.
The techniques used in this course involve Basic MSI
projects in InstallShield, which use the Windows
Installer service (MSI) for the installation's behavior
and appearance. While the course does occasionally make
use of InstallScript custom actions in Basic MSI
projects, this course does not cover InstallScript MSI
projects.
Objectives
In this class, you will learn how to:
- Improve your installer's appearance using
advanced control types
- Provide detailed user feedback using billboards,
progress information, and logging
- Correctly create custom actions for extending
Windows Installer functionality (and learn when not
to!)
- Avoid common pitfalls when coding custom actions
- Work with InstallShield prerequisites and
chained installations to handle multi-package
requirements
Course Prerequisites
Before taking this class, you should be familiar with
the topics in the InstallShield training course "InstallShield,
MSI Projects".
Many sections of the course assume familiarity with
at least one of the programming or scripting languages
C/C++, InstallScript, C#, or VBScript.
Course Curriculum
The following course sections and topics will be covered
in the class. If you have a specific area that you think
will need extra attention, mention it to your instructor
on the first day of class.
Introduction and Review
The course begins with a brief review of Windows
Installer and InstallShield concepts and terminology
used throughout the week:
- About Windows Installer installation packages
- Product organization: features, components, and
key paths
- Properties and conditions
- Using the InstallShield environment
- Package validation
- Features introduced in recent InstallShield
versions
User Interface
The purpose of your installer's user interface is to
display information to the user, prompt the user for
information needed to install and configure your
project, and to display progress information while
system changes are taking place. In this section, you
will learn about:
- Setting up interactions between controls
- Using MaskedEdit controls for formatted user
input
- Features and components:
- Multiple file destinations
- Customizing the feature-selection dialog
- Conditions based on feature and component
- VolumeSelectCombo controls
- Displaying billboards during data transfer
- Techniques for dynamically refreshing dialog
boxes
Custom Actions
Most of the system changes made by an installation
program are handled by Windows Installer standard
actions and tables: the files you install are handled by
the File table and the InstallFiles action, registry
data handled by the Registry table and the
WriteRegistryValues action, and so forth. Because
standard actions cannot handle every task an
installation program needs to perform, Windows Installer
supports custom actions. This section describes:
- How to use Windows Installer functionality to
avoid custom actions:
- Copying, moving, and deleting files
- Reading and deleting registry information
- Using InstallShield extensions
- Types of custom actions, and advantages and
disadvantages of each
- All about action scheduling:
- Immediate and deferred actions, and deciding
which type to use
- Rollback and commit actions
- User and system contexts
- Detecting and handling installation,
uninstallation, rollback, and
uninstallation-rollback
- "Simple" custom actions: launching executables,
setting properties and Directory properties, and
displaying error messages
- Writing code for script, MSI DLL, InstallScript,
and managed-code custom actions
- Getting and setting property values
- Getting property values during deferred
execution
- Returning success to Windows Installer
- Triggering rollback
- Additional interaction with the running
installation
Additional Custom Action Techniques
Going beyond the basics, this section describes advanced
techniques for working with standard and custom MSI
database tables at run time, along with a collection of
finishing touches that improve the appearance of-and
user confidence in-your installer.
- Accessing and modifying the running MSI package
for dynamic effects such as:
- Populating list-type controls at run time
- Hiding features after CostFinalize
- Changing shortcut descriptions at run time
- Working with custom MSI tables
- Writing to the Windows Installer log file
- Additional user feedback during action
execution:
- Static action text
- Detailed action data
- Interaction with the progress bar control
- Handling the Cancel button
- Correctly displaying message boxes
Additional Topics
The course material ends with discussions of additional
tools and techniques you can use to improve your
installation behavior, including:
- Windows Installer's reboots and files-in-use
behavior
- Working with InstallShield prerequisites
- Working with the Directory table
- Chained installations
- Multi-instance packages
Putting the Pieces Together
At the end of class, you will work on a project that
incorporates the main ideas of the course, such as:
- Presenting dynamic data to the user
- Writing an action that correctly handles
installation, uninstallation, rollback,
uninstallation-rollback, and cleanup
- Logging the action's changes
- Displaying detailed progress information