Sei sulla pagina 1di 20

Application Packaging using InstallShield

• Santhosh J
• Aug 2010
Agenda

 Introduction
 Application packaging concepts
 Types of installers
► Legacy installers
► Basic MSI installers
► Installscript MSI installers
 InstallShield - Overview
 InstallScript - Basics
 Custom Dialogs
 Extending InstallShield functionalities with external DLLs
 Upgrade installer using InstallShield
 Patch installer using InstallShield
Agenda (Continued)

 Silent install
 Merge modules & Transforms - Overview
 InstallShield best practices
 Debugging
 Support tools
 Summary
Introduction

 Application packaging is the process of creating


installation kits for applications.
 Most programs are supplied in the form of a condensed
file. In order to use, they must be ‘unpacked’ and the
information are furnished into the system accordingly.
 Common operations performed by an installer:
► Files and folders
► Windows registry entries
► Configuration files
► Environment variables
► Links or shortcuts
Introduction (Continued…)

 Why we need an installer?


► Simple for end-users
► Easy file management
► Fewer manual steps to be performed
► Better administration – Can be used with distribution
mechanisms like Tivoli, SMS, Marimba etc.
Application packaging concepts

 The term application packaging may be referred


to many contexts
► Setup installers
— When application is set up in the machine for the first
time, from the scratch
► Upgrade installers
— When an installed application is upgraded to a newer
version
► Patch installers/Hot fixes
— When certain files in the application is updated, without
updating the version of the product
Types of installation packages
 Legacy “Setup.exe” installer
► Traditional installer, which is a self extracting exe
► Depends upon the tool (look and feel are changed according to the creating tool, like
InstallShield, Wise installer etc.)
► Uses the runtime engine provided by respective products
 Windows MSI installer (aka Basic MSI installer)
► MSI files are not executable files
► MSI files are binary databases in a compressed format
► Windows installer service – “msiexec.exe” is the runtime engine
► Stringent guidelines
► Widely used as industrial standard
 InstallScript MSI installer
► Provided by InstallShield
► Hybrid type which has the capability of both InstallShield engine and Windows installer
engine
► Liberal guidelines
► Widely used as industrial standard, though next to Basic MSI installer
What is different in them?

Legacy Basic MSI InstallScript MSI


Windows installer
Windows supported by
Runtime engine InstallShield Installer InstallScript
Self healing No Yes Yes
Flexibility Very high Low High
Windows Logo
certification No Yes Yes
Portability No Yes Limited
InstallShield-Overview
Why InstallShield?

 Powerful IDE
 MSI Direct editor
 Setup debugger
 Easy configurations
 Simple and easily understandable scripting language
 Supplies enough templates to create basic setups – Saves
time
 Efficient support systems
 Wider community groups
Editions of InstallShield
InstallShield Project types

 InstallShield supports a wide range of project


types according to various scenarios faced by day
to day application packaging process.
► Basic MSI Installers
► Setup Installers
► Universal Installers
► Web Installers
► Merge Modules
► Quick Patches
► Smart Device Setups
► Transforms
InstallShield Project Types

 InstallScript project
► The run-time user interface is rendered and its flow controlled by InstallScript
► The changes that are made to the target operating system are done through
InstallScript engine
► This does not have any reliance on Windows Installer.
► Using InstallScript as the installation driver has many benefits.
— Simpler event model.
— Custom functionalities can be created by writing separate functions.
— InstallScript projects have literally no limitations. It offers a wide range of
standard controls along with the ability to add custom dialog controls.
— Dialog messaging in the script enables you to have complete control over how your
end-user dialogs behave.
 Basic MSI Project
► A Basic MSI project uses Windows Installer as it’s engine
► Basic MSI projects have the ability to run InstallScript code in the form of
custom actions, though the type of InstallScript code and the number of
functions that can be run are limited.
InstallShield Project Types

 InstallScript MSI
► InstallScript MSI project uses both InstallScript and Windows Installer tables.
► The InstallScript MSI project type uses InstallScript to control the installation
and Windows Installer to handle core functions.
► It is designed for installations requiring a highly customized user interface.
► User interface is rendered and its flow controlled by InstallScript, while the
changes that are made to the target operating system are done through
Microsoft's Windows Installer service.
► The model that this project type follows is sometimes referred to as an
External User Interface (UI) model, because it does not use the Windows
Installer's native UI rendering capabilities. This type of setup is also known as
the script-driven model, because InstallScript acts as a driver to the Windows
Installer setup.
InstallShield Project Types

 Merge modules
► Merge modules are pluggable modules.
► It is not executable
 Quick Patch
► Recommended for installation authors who want updates to their end users.
► QuickPatch authoring provides an alternative to creating a patch configuration
in the Patch Design view even though it provides less customization.
 Transforms
► A transform (.mst file) is a simplified Windows Installer database that contains
the differences between two MSI databases.
► Transforms enable an administrator to apply modified settings to a database
when deploying an installation package.
InstallShield event flow

Installation Maintenance
How to display dialogs?

 InstallShield provides a variety of built-in dialogs which


are commonly used in installers
 This includes:
► Welcome dialog
► Customer information
► Setup type
► Destination directory
► Finish dialog
► Ask Yes or No
► Message box
…etc…
 Let us see how these functions are used…
System variables in InstallShield

 InstallShield provides many ready-to-use variables which


may be needed by an installer developer
► How to find current operating system?
► How to find current screen resolution?
► How to find the location of program files?
► What service pack of windows is currently installed?
 Apart from the kind of question seen above, there are
situations where we need some of the InstallShield
specific information
► Support folder
► Install directory
► Source disk
► Source directory
► Uninstall string (See more on next slide…
More system variables

 FOLDER_DESKTOP  SRCDIR
 FOLDER_PROGRAMS
 SRCDISK
 FOLDER_STARTMENU
 FOLDER_STARTUP  SUPPORTDIR
 MEDIA  TARGETDIR
 MODE  TARGETDISK
 PRODUCT_GUID

 UNINSTALL_STRING
PROGRAMFILES
 SELECTED_LANGUAGE  WINDIR
 SHELL_OBJECT_FOLDER  WINDISK
 WINSYSDIR
String manipulation functions

 GetDir
 GetDisk
 NumToStr
 StrToNum
 ParsePath
 StrCompare
 StrFind
 StrGetTokens
 StrLength
 StrLengthChars
 StrRemoveLastSlash
 StrSub
 StrToLower, StrToUpper

Potrebbero piacerti anche