SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Downloaden Sie, um offline zu lesen
Building MSI Updates
W H I T E PA P E R




                     and Patches
                     by Robert Dickau
                     Principal Technical Training Writer, Flexera Software
Building MSI Updates and Patches
Introduction                                                           gives you access to the raw MSI database tables.
This white paper describes the changes you make to a                   It is also assumed you are familiar with some of the wizards
Windows Installer (MSI) installation package for it to behave          available with InstallShield, such as the Release Wizard and
as the desired type of update or patch. It begins by discussing        Component Wizard.
information about settings to change in the MSI database. It
also highlights the tools in InstallShield® by Flexera™ Software       	 •		 he Release Wizard, available under the Build menu
                                                                           T
that simplify the process.                                                 and also from the Releases view, lets you describe the
                                                                           properties—media type, compression settings, and so
Also, if you haven’t read the white paper, “Designing an                   forth—of	a	release,	and	then	builds	the	specified	release	
Update-Friendly MSI Installation,” it has valuable tips on how             image.
to build your initial install. You can download it at                  	 •		 he Component Wizard, available by right-clicking a feature
                                                                           T
www.flexerasoftware.com/whitepapers.                                       in the Setup Design view, lets you create special types of
                                                                           components, such as components for COM servers, fonts,
Using the InstallShield Environment                                        and Windows services.
This white paper frequently refers to the InstallShield
development environment. It is assumed you are familiar with the       The InstallShield Help Library contains information about using
general layout of the InstallShield interface, which contains a list   every view and wizard in the InstallShield environment. The
of views with which you can modify different portions of your          InstallShield Help Library is available when you press F1 with
installation project.                                                  any view selected; you can also select Contents from the Help
                                                                       menu to view the help library.

                                                                       In addition to the graphical environment, InstallShield provides
                                                                       several tools for modifying and building projects from the
                                                                       command line or an external script. For example, to build a
                                                                       project	from	the	command	line,	batch	file,	or	other	automated	
                                                                       process, you can use the executable IsCmdBld.exe. The
                                                                       IsCmdBld executable is located in the System subdirectory of the
                                                                       InstallShield distribution directory.

                                                                       To	rebuild	a	project,	you	pass	IsCmdBld	the	project	file	path,	
                                                                       the	product	configuration	name,	and	the	release	name	that	you	
                                                                       want to rebuild. A sample command appears as follows:

                                                                       	 	scmdbld	-p	C:ProductName.ism	-a	BuildConfig	-r	
                                                                         i
                                                                         ReleaseName
For example, the General Information view is where you set general
product and project properties; the Setup Design view enables you      In addition, InstallShield provides an Automation interface, with
to edit the features, components, and component data used by your      which	you	can	modify	the	contents	of	a	project	file	without	using	
project; the Registry view enables you to modify the registry data     the graphical environment.
installed by your installation program; and the Direct Editor view


2                                                                                       Flexera Software: InstallShield White Paper Series
Building MSI Updates and Patches




                                                                        	 •		 pgradeCode: MSI property containing a GUID
                                                                            U
   Learn More about InstallShield:                                          represent ing t he current product “family”; in t he
   If you wish to learn more about the capabilities of                      major-upgrade process, if two products have different
   InstallShield, please visit the Flexera Software Web site                ProductCode values but t he same UpgradeCode value,
   at http://www.flexerasoftware.com/installshield                          MSI knows t hat t he products are related, and are t herefore
                                                                            candidates for t he major-upgrade process. In general, t he
Review of Upgrade Types                                                     upgrade code value never changes.
Windows Installer supports three types of product upgrades:
small updates, minor upgrades, and major upgrades. The three            When you design different types of upgrades, you must change
types	of	upgrades	are	defined	as	follows.                               different combinat ions of t hese codes. The following table
                                                                        summarizes t he required changes.
	 •		 small update consists of product changes, such as hot
     A
     fixes,	so	small	t hat	no	change	to	t he	product	version	is	                       Package      Product        Product      Upgrade
                                                                                      code (SIS)    Version         Code         Code
     necessary or desired. (A drawback to small updates is t hat
     external programs, including installers for later versions of      Small
                                                                                          X
     your product, will not be able to dist inguish a product wit h     update
     t he small update applied from one wit hout t he                   Minor
     small update.)                                                                       X            X
                                                                        upgrade
	 •		 minor upgrade is a change to the product large enough
     A
                                                                        Major
     to merit a change to the product version, such as updating                           X        X (usually)        X
                                                                        upgrade
     version 1.1 to 1.2, but in which there have been no
     significant	changes	to	the	setup	organization	between	
     versions. The install-time behavior of a minor upgrade is to       Inside InstallShield, the package code is exposed in the
     install over the existing product.                                 Summary Information Stream view, under General Information.
	 •	 A major upgrade includes substantial product changes,
     such as updating version 1.2 to 2.0. A major upgrade can
     contain	significant	changes	to	the	setup	architecture;	later.	
     The install-time behavior of a major upgrade can be to
     uninstall the earlier version and install the new one, or to
     install over the earlier version and then remove any
     leftover data.
                                                                        In this view, you can select the Package Code setting and click
NOTE: For an earlier product version that was installed with a          the Generate GUID button (not pictured).
legacy (non–Windows Installer) setup, a custom action will normally
be required to uninstall or modify the existing product installation.   Because the package code should change for every new
                                                                        release, the default behavior of InstallShield is to generate a
MSI Codes and Updates                                                   new package code each time you perform a build. You can
Every MSI database contains a handful of codes that identify the        modify	this	behavior	by	selecting	a	product	configuration	icon	in	
product being installed.                                                the Releases view, and setting Generate Package Code to No,
                                                                        though doing so is strongly discouraged.
	 •		 ackage Code: part of t he Summary Informat ion Stream,
     P
     t he	package	code	ident ifies	a	part icular	database.	Any	
     two MSI databases wit h ident ical package codes must
     have ident ical contents, and t herefore you should change
     t he package code for each build.
	 •		 roductVersion: MSI property storing t he product version.
     P
     Note	t hat	MSI	uses	only	t he	first	t hree	fields	of	t he	
     ProductVersion property for version comparisons: in
     a.b.c.d,	t he	field	d is ignored. (Note t hat t his is true just   Note that you can also use this view to specify a product version,
     for	comparisons	of	ProductVersion	values,	and	not	for	file	        product code, and other properties for the current product-build
     versions.	File-version	comparisons	can	use	all	four	fields	of	     configuration.	If	you	enter	a	specific	value	here,	it	automatically	
     a	file’s	version.)                                                 overrides the value in the Product Properties view.
	 •	 	 roductCode: MSI property containing the GUID for the
     P
     current product. MSI treats two products with different
     ProductCode GUIDs as unrelated, even if ProductName is the
     same. (As you will see, the major-upgrade process instructs
     MSI to treat two products with different GUIDs as related.)


Flexera Software: InstallShield White Paper Series                                                                                             3
Building MSI Updates and Patches




The other settings—Version, Product Code, and Upgrade                 Installer runs
Code—are exposed in the Product Properties view, also under           the installer based on the cached version of the existing earlier
General Information.                                                  product version.

                                                                      NOTE: You must take care not to set REINSTALL=ALL for a first-time
                                                                      installation. Later you will see how InstallShield can create a setup
                                                                      launcher that sets REINSTALL dependent on whether an earlier
                                                                      version of the product is present on the target system.

To change the Version setting, simply type in the updated             Major Upgrades
value. To change Product Code (for a major upgrade), you can          For a major upgrade, as indicated in the earlier table, you
select the property and then click the Generate GUID button           must change the package code (in the Summary Information
(not pictured). These settings are also available in the Property     Stream); you will usually change the product version (in the
Manager, in the Behavior and Logic view group.                        ProductVersion property in the Property table); and now must
                                                                      also change the product code (the ProductCode property in the
TIP: An advanced technique is to modify a project’s version           Property table).
and GUIDs using the InstallShield Automation interface, which
provides a GenerateGUID method. For more information, see             When you change the product code, Windows Installer treats
the InstallShield Help Library.                                       your latest and previous product versions as unrelated, even
                                                                      though the ProductName values are likely the same. If you
Creating Update Packages                                              want both versions of your product to be installable on the
This section describes the database changes required for              same system, you can simply change the product code and
different types of updates, and describes how to use the tools        the main installation directory (often INSTALLDIR). (Naturally,
provided in InstallShield to simplify the update-development          the application must have been developed to support
process.                                                              multiple simultaneous instances by separating each instance’s
                                                                      configuration	settings	and	data	files.)
Minor Upgrades
As	listed	in	the	table	above,	in	addition	to	the	new	files	and	       If instead you want your latest product version to supersede
other data in your update package, to create a minor upgrade          an earlier installed version, you will populate records in the
you must change the package code and product version of your          Upgrade table. A record in the Upgrade table contains the
installer.                                                            following	fields:

NOTE: By default, when you run an installation from the               	 •	 	 he	UpgradeCode	value	of	the	product(s)	you	want	
                                                                           T
InstallShield environment by clicking the Run toolbar button,              to update.
InstallShield will quietly uninstall any previous version of your     	 •	 A range of versions of products to update.
product present on the development machine. To change this            	 •	 	 ptional	language	information	for	the	product	to	update.
                                                                           O
setting so that deploying an installation from the environment will   	 •	 	 n	optional	list	of	features	to	remove.
                                                                           A
use the default MSI behavior, pull down the Tools menu, select        	 •	 	 	public	property	(called	an	“action	property”)	associated	
                                                                           A
Options, select the Preferences tab, and clear the check box               with any products to update.
labeled “Uninstall before installing”.
                                                                      A sample record in the Upgrade table might appear
To deploy the minor upgrade, a typical command line is                as follows.
the following:
   msiexec /i product.msi REINSTALLMODE=voums
                                                                       UpgradeCode        {11111111-2222-3333-4444-555555555555}
   REINSTALL=ALL
                                                                       VersionMin         1.0.0
If the update contains features that you do not want to update,
you should set REINSTALL to a comma-separated list of the              VersionMax         2.0.0
features that you do want to update, as in the following               Language
command (names you use in the REINSTALL property are                   Attributes         1025
case-sensitive):
                                                                       Remove

    msiexec /i product.msi REINSTALLMODE=voums                         ActionProperty     OLDPRODUCTS
    REINSTALL=F1,F3,F5
                                                                      The	bit	flags	used	in	the	Attributes	field	are	described	in	the	MSI	
The important setting for deploying a minor upgrade is the            Help Library page “Upgrade Table”. The value 1025 used here
REINSTALLMODE	flag	“v”,	which	indicates	to	run	the	installer	         means that all languages should be detected (1024) and that
using the updated MSI database and to re-cache the package            feature states should be migrated (1) from the installed product
based	on	the	new	database.	Without	the	“v”	flag,	Windows	             to the latest product.



4                                                                                         Flexera Software: InstallShield White Paper Series
Building MSI Updates and Patches




In addition to adding records to the Upgrade table, some further     RelatedProducts property of the MSI Automation interface.
authoring steps required are to:
                                                                     When	you	define	a	major	upgrade,	it	can	be	useful	to	run	MSI	
	 •		 dd	the	action	property	name	to	the	value	of	the	
    A                                                                validation on your upgrade package. The rules ICE61, ICE63,
    SecureCustomProperties property.                                 and ICE74 can detect package-authoring errors related to major
	 •		 nsure	the	value	of	ALLUSERS	is	the	same	in	the	before	and	
    E                                                                upgrade packages. By default, InstallShield performs upgrade
    after versions, through a custom action or from the              validation	during	the	build	process	to	flag	common	authoring	
    command line.                                                    problems with the different types of upgrades.

TIP: Because the packages involved in a major upgrade have           To deploy a major upgrade package, the user can simply launch
different product codes, you cannot use the MSI property             the MSI database or setup launcher, without needing to set any
“Installed” to determine if the earlier version of your product      special values for REINSTALLMODE or REINSTALL.
is present on the target system. Instead, the older product
version can determine if it is being removed because of a major      InstallShield Upgrades View
upgrade using the UPGRADINGPRODUCTCODE property; the                 To simplify the process of creating minor and major upgrades,
newer version can use the action property (say, OLDPRODUCTS)         InstallShield provides the Upgrades view, in which you specify
that	you	defined	in	the	Upgrade	table.                               your latest product version and the earlier packages you want it
                                                                     to update.
At run time, the standard MSI action FindRelatedProducts reads
the records in the Upgrade table, and, if a related product is
found, the product code for that product is added to the action
property. FindRelatedProducts is by default placed early in both
the User Interface and Execute sequences.

The MigrateFeatureStates action (if appropriate) attempts
to migrate the feature-selection states from an installed
product version to the newer version. Finally, the standard
RemoveExistingProducts action reads the product codes stored in
the Upgrade table action property, and in effect performs silent
nested-uninstallation actions on those products.

The RemoveExistingProducts action can be placed in different         In	the	Upgrades	view,	you	can	define	a	“minor	upgrade	item”	or	
locations	to	define	different	types	of	upgrade	behavior.	In	         a “major upgrade item”. (There is also an “automatic upgrade
short, placing RemoveExistingProducts early in the Execute           item”, which determines which type of upgrade to create based
sequence instructs Windows Installer to completely remove the        on the earlier and later packages you specify. Automatic
existing product data before installing the new product. Placing     upgrade items will not be discussed here.) The two types of
RemoveExistingProducts late in the Execute sequence causes the       upgrade items are described in the following sections.
upgrade to install the new product data, and then remove
old data.                                                            For more information about the different types of upgrades,
                                                                     you can select the appropriate help icon under the Additional
TIP: The	Attributes	field	of	the	Upgrade	table	also	supports	a	      Information	icon,	pictured	in	the	figure	above.
detect-only bit (value 2). If an Upgrade record has the detect-
only	bit	set,	the	action	property	defined	in	that	record	will	be	    Creating Minor Upgrades with InstallShield
populated with the product codes of corresponding product            When you create a minor upgrade item, a general setting
versions, but the RemoveExistingProducts action will not remove      you can modify is how a setup launcher should behave if an
those products. The detect-only bit is useful, for example, when     earlier product version is present. You can modify this setting
creating a custom action that prevents an older version of the       by selecting the Upgrade Windows Installer Setup icon and
product from installing over a newer version. Recent InstallShield   reviewing	the	Small/Minor	Upgrade	Settings	section	of	the	IDE,	
versions automatically create such an Upgrade-table record and       as	pictured	in	the	following	figure.
custom action for new Basic MSI projects. For more information
about creating such a custom action, see the MSI Help Library
page “How do I prevent an old package from installing over a
newer version?”

TIP: If you use the same UpgradeCode value for every release
of your product, an external program or custom action can
determine the product codes of any installed copies of your
product using the MSI API MsiEnumRelatedProducts, or the




Flexera Software: InstallShield White Paper Series                                                                                      5
Building MSI Updates and Patches




As you have seen, a minor upgrade package requires the                Creating Major Upgrades with InstallShield
REINSTALLMODE and REINSTALL properties to be set during               When you create a major upgrade item, a general setting you
deployment.	If	your	build	configuration	included	a	Setup.exe	         can modify is where to schedule the RemoveExistingProducts
setup launcher, you can select one of the following settings:         action. You can modify this setting by selecting the Upgrade
                                                                      Windows Installer Setup icon and reviewing the Major Upgrade
	 •	 Disable: this setting causes Setup.exe not to set                Settings	section	of	the	IDE,	as	pictured	in	the	following	figure.
     REINSTALLMODE and REINSTALL if the launcher discovers
     an earlier version of the product on the target system. With
     this setting, you must manually set REINSTALLMODE and
     REINSTALL through other means.
	 •		 on’t prompt the user, just install the upgrade: this setting
     D
     causes Setup.exe to set REINSTALLMODE to “voums” and
     REINSTALL to “ALL” if an earlier product version is detected,
     and	otherwise	just	behaves	as	a	first-time	installation.
	 •	 Prompt: this setting (the default) causes Setup.exe to
     display a message to the user if an earlier version exists,
     prompting whether to update the setup. If the user agrees,
     Setup.exe sets REINSTALLMODE and REINSTALL as in the             To create a major-upgrade item, right-click the Upgrade
     previous setting. If no earlier version exists, no prompt is     Windows Installer Setup icon and select Add Major Upgrade
     displayed,	and	the	setup	behaves	as	a	first-time	installation.   Item. You can rename the icon to describe the latest version of
                                                                      your setup, as in “V200”.
To create a minor upgrade item, right-click the Upgrade
Windows Installer Setup icon and select Add Minor Upgrade             The properties for your major-upgrade item are a more user-
Item. If desired, you can rename the new icon to represent the        friendly view of the Upgrade table settings. In the Common
earlier version of your product, as in “Version100”. In the “Setup    tab for a major-upgrade item (pictured below), you specify the
to	Upgrade”	field,	browse	for	the	MSI	database	for	the	earlier	       Upgrade Code value of the products you want to update, as well
product version that you want to update.                              as the versions of product you want to update.




If you are creating an upgrade that can update more than one
previous version, you can right-click the Upgrade Windows
Installer Setup icon and create additional minor-upgrade items.

After having created one or more minor-upgrade items,                 Designing an Update-Friendly Installation
whenever you build a media set, by default InstallShield will         (The existing item ISPreventDowngrade is provided by
perform validation on the latest and earlier product versions,        InstallShield to prevent an older version of a product from being
alerting you to possible errors in the upgrade settings.              installed over a newer version.)

If you built your updated version to include Setup.exe, and set       In the Advanced tab for a major-upgrade item, you can specify
the minor upgrade settings to prompt the user whether to update       other settings to be written to the Upgrade table, such as the
a product, the user will see the following prompt,                    name of the action property (by default “ISACTIONPROP1”),
if appropriate.                                                       whether to remove only certain features, and so forth.




6                                                                                       Flexera Software: InstallShield White Paper Series
Building MSI Updates and Patches




At build time, InstallShield by default includes an ISSetAllUsers        You run a patch using a command line similar to the following:
custom action to manage setting ALLUSERS correctly during
a major upgrade. (In addition, ISSetAllUsers sets the custom               msiexec /p patch.msp REINSTALLMODE=oums REINSTALL=ALL
property IS_MAJOR_UPGRADE if a major upgrade is taking
place.) To control whether to include the ISSetAllUsers action,          It is not necessary to specify the product to which the patch
pull down the Tools menu, select Options, and activate the               applies; if the user does not have an appropriate target
General tab. You can clear or select the “Automatically create           product version installed, the following error dialog box will be
ISSetAllUsers action” check box.                                         displayed.

To deploy a major upgrade, a user can simply launch the MSI
file	or	setup	launcher.	No	special	command-line	settings	are	
required. If a related earlier product version is detected, it will be
removed; if no earlier version is detected, the setup will behave
as	a	first-time	installation.

Creating Patches
A patch is a packaging mechanism for an upgrade. After
you have created an upgrade—usually a minor upgrade—as
described above, you can build a patch for it. The earlier
product databases for which you want to build a patch are                QuickPatch® Projects
commonly called the target databases, and the latest version is          A QuickPatch project enables you to quickly create a patch for
commonly called the upgraded package.                                    an	existing	MSI	package,	where	the	patch	contains	only	file	
                                                                         and registry changes. In a QuickPatch project, you can add,
PCP Files                                                                modify,	or	remove	files	and	registry	data;	if	you	need	the	patch	
InstallShield	uses	Patch	Creation	Property	(PCP)	files	to	store	         to include additional changes, you should use the Patch Design
settings for a patch to be created. These settings include, among        view, described in the following section.
many others:
                                                                         To create a new QuickPatch project in InstallShield, you can pull
	   •		 	GUID	for	the	patch
      A                                                                  down the File menu, select New, and then select QuickPatch
	   •	ProductCode	values	for	products	the	patch	will	update              Project,	entering	the	name	of	the	InstallShield	project	(ISM)	file	
	   •	A	list	of	patches	that	the	current	patch	supersedes                to create.
	   •		 ocations	of	uncompressed	source	and	target	
      L
      MSI packages                                                       In the QuickPatch Project Base panel, you are prompted to base
                                                                         the patch on an existing MSI package or on an existing
A	PCP	file	uses	the	MSI	format,	and	can	be	edited	directly	with	         QuickPatch project.
InstallShield	or	Orca;	the	standard	tables	and	fields	of	a	PCP	file	
are described in the MSI Help Library.

The	four	required	tables	in	a	PCP	file	are	the	following:

	 •		 roperties:	contains	global	settings	for	the	patch,	such	
    P
    as the patch GUID, the path to the patch-creation output
    directory,	whether	to	include	only	entire	files,	and	so	forth.
	 •		mageFamilies:	contains	an	identifier	for	a	group	of	related	
    I
    target and updated images.
	 •		 argetImages:	describes	the	target	MSI	packages	involved	
    T
    in the patch.
	 •		 pgradedImages:	describes	the	upgraded	packages	
    U
    involved in the patch.

TIP: Given a product’s ProductCode value, you can determine
which patches have been applied to it by using the MSI API               You will then be prompted for the original database or project,
function MsiEnumPatches, or the MSI Automation interface                 creating an uncompressed image of your installation package
property Patches.                                                        if necessary.




Flexera Software: InstallShield White Paper Series                                                                                             7
Building MSI Updates and Patches




                                                                     In the Files view, you see a tree of the destination folders used
                                                                     by	your	project,	and	the	files	in	them.	Selecting	a	file	icon	in	
                                                                     the	Original	Setup	Files	tree	displays	the	file’s	destination	and	
                                                                     version	information,	as	pictured	in	the	following	figure.




                                                                     In	this	view,	you	can	change,	add,	and	remove	files.	To	update	
                                                                     a	file,	drag	its	icon	from	the	Original	Setup	Files	tree	to	the	Files	
                                                                     to	Patch	tree.	When	you	select	the	file	icon	in	the	Files	to	Patch	
                                                                     tree, in the Update File area you then browse for the newer
In the IDE for a QuickPatch project, the Patch Settings view         version	of	the	file.
group contains views in which you can edit the general
information,	files,	and	registry	data	to	be	included	in	the	patch.

In the General Information view, the Product Properties section
is where you can view and modify the location of the Windows
Installer package for which the patch is being generated,
the patch version information, and optional Update Service
information.




                                                                     Note	that	a	file	installed	by	a	patch	by	default	obeys	the	
                                                                     file-overwrite	rules.	If	you	want,	you	can	select	the	Overwrite	
                                                                     Any	Existing	File	check	box	to	include	the	entire	updated	file	in	
                                                                     the patch (as opposed to just the byte-level binary differences).
                                                                     This	setting	causes	your	file	to	overwrite	any	earlier	version	of	
                                                                     the	file	on	the	target	system	in	the	case	of	a	versioned	file,	or	
                                                                     overwrite	any	existing	file	in	the	case	of	an	unversioned	file.
In the Build Settings view (not pictured), you specify such
settings as:                                                         You	can	also	delete	the	file	from	the	setup	using	your	patch	by	
                                                                     selecting	the	“delete	this	file”	check	box	at	the	bottom	of	the	
	 •		 here	to	place	the	build	output	(the	MSP	file,	and	
    W                                                                file-information	view.
    so forth).
	 •		 hether	to	build	an	Update.exe	launcher,	which	launches	
    W                                                                To	add	a	new	file	to	the	product	using	your	patch,	right-click	
    the	patch	file	with	the	appropriate	REINSTALLMODE	and	           the Files to Patch icon and select Insert New File. You will be
    REINSTALL values.                                                prompted	to	browse	for	the	new	file;	afterward,	you	can	specify	
	 •		 hether	to	include	the	MSI,	InstallScript,	or	.NET	
    W                                                                the	file’s	destination	and	the	features	with	which	the	new	file	is	
    redistributables with your patch launcher.                       associated.
	 •		 here	to	obtain	any	redistributables	you	selected:	either	
    W
    built into Update.exe or downloaded from a URL.                  Use of the Registry view (not pictured) follows similarly. In
                                                                     the Registry view, you see a tree of registry data contained in
In the History and Custom Actions views (not pictured), you          the earlier product version, as well as a tree representing the
can view and modify the base and intermediate projects that          registry data on the development system. You can then add,
your current patch applies to, and specify if any of your custom     remove, and modify registry keys and values relative to
actions should be set up not to run while your patch is              the original package, and the patch will include the
being applied.                                                       appropriate changes.



8                                                                                       Flexera Software: InstallShield White Paper Series
Building MSI Updates and Patches




To build the patch, simply click the Build toolbar button. By
default, recent versions of InstallShield will perform upgrade and
patch validation. When the build is complete, you can open the
folder containing the build output by clicking the Open Release
Folder toolbar button. The output directory includes the patch
(MSP	file)	or	Update.exe,	the	build	log,	and	so	forth.

Using the Patch Design View
The InstallShield Patch Design view provides a more
sophisticated environment for creating patches. Unlike
QuickPatch projects, which are a separate project type, the
Patch Design view is associated with an existing project. In
the Patch Design view, it is assumed you have already built the
projects for your earlier and later product versions.                   In	the	Latest	Setup	Path	field,	you	can	use	the	variable	
                                                                        <ISLatestRelease> for InstallShield always to use the latest build
NOTE: When running the Release Wizard for your new product              of your setup as the upgraded image. Alternatively, you can
version, you will want to use patch optimization, especially if         browse	for	a	specific	latest	version’s	MSI	database	or	Setup.exe	
any of your components have used dynamic file linking that              launcher. The release you select here should be an uncompressed
includes subfolders.                                                    release, ideally created with an administrative installation if the
                                                                        previous product versions were compressed.
To create a patch, you begin by right-clicking the Patch Design
icon	and	selecting	Add	New	Patch	Configuration.	A	patch	                In addition, you can use the Include Whole Files section to
configuration	consists	of	one	“Latest	Setup”	and	one	or	more	           specify	particular	files	to	include	as	whole	files;	the	default	
“Previous Setups”. Before you specify the latest and previous           behavior	is	to	include	the	byte-level	file	differences,	where	
setups, you can specify overall patch properties, such as where         possible.	Including	some	files	as	whole	files	can	suppress	certain	
to store the built patch data, whether to create a patch launcher       prompts for the original installation source while the patch is
Update.exe, and so forth.                                               being applied.

                                                                        Under the latest-setup icon are folders labeled Previous Setups
                                                                        and Additional External Files. In the Previous Setups folder, you
                                                                        add the target images for the current patch. You can begin by
                                                                        right-clicking the Previous Setups icon and selecting Add New
                                                                        Previous Setup, if desired renaming the new icon. InstallShield
                                                                        automatically provides one icon for a previous setup.




                                                                        In	the	Previous	Setup	Path	field,	you	browse	for	the	earlier	
In	the	Advanced	tab	for	a	patch	configuration	(not	pictured),	          version’s MSI database or Setup.exe launcher. Because the
you	can	specify	additional	settings	to	write	to	the	PCP	file,	such	     patch-creation process requires an uncompressed release, you
as	a	fixed	patch	GUID,	whether	to	include	only	entire	files,	and	       will be prompted for a location to decompress the previous
so	forth.	In	addition,	the	Identification,	Digital	Signature,	and	      version, if necessary.
Sequence tabs enable you to take advantage of uninstallable
patches and patch sequences, introduced in recent versions of           In the Advanced tab for a previous version (not pictured), you
Windows Installer.                                                      can specify settings such as the version relationship required
                                                                        between the latest and previous versions, and which product-
To specify the latest version (the updated image) of your package,      version	fields	to	check	to	determine	if	a	patch	is	appropriate	
right-click	the	patch	configuration	icon	and	select	Add	New	Latest	     for a particular product version on the target system. Recent
Setup. InstallShield automatically provides one latest setup project,   InstallShield versions support streamlining a QuickPatch
which you can rename if desired.                                        package, which removes subfeatures and custom actions that
                                                                        are unnecessary for simple QuickPatch projects.




Flexera Software: InstallShield White Paper Series                                                                                          9
Building MSI Updates and Patches




In	the	Additional	External	Files	folder,	you	can	specify	files	that	
you want to patch, but which were not installed by your previous
setups. The data you enter here is written to the optional
ExternalFiles	table	of	your	PCP	file.

Finally,	to	build	the	patch,	select	the	patch-configuration	icon	
and click the Build the Patch button. The build will return an
error and exit if your latest setup version was built compressed.
By default, InstallShield will also perform upgrade and
patch validation.

Moreover, recent versions of IsCmdBld support a -patch_config
switch for building patches from the command line.

TIP: In	Windows,	you	can	right-click	a	built	.msp	patch	file	and	
select Edit with InstallShield to launch the Open MSP Wizard,
with which you can view and edit the package changes
contained	in	a	patch	file.

NOTE: Deploying an effective minor upgrade—either as a full
installation package or as a patch—requires the REINSTALL and
REINSTALLMODE properties to be set. You have seen how these
properties can be set at the command line, and how InstallShield
can create a setup launcher that populates the properties. In
addition, the properties can be set by custom actions or control
events inside the running installation. The one exception is that
the “v” flag for REINSTALLMODE, which indicates to re-cache the
updated MSI database during a minor upgrade packaged as a full
installation database, must be set outside the installation program,
and cannot be changed from within a running installation.

Summary
This white paper discusses how to create minor and major
upgrades, and how to package updates as full installation
databases or as patches.


     Begin a Free Evaluation of InstallShield:
     You can download a free trial version of InstallShield from
     the Flexera Software Web site at:
     www.flexerasoftware.com/installshield/eval

     Want to learn more best practices for building quality
     installations? Join an InstallShield training class – visit
     www.flexerasoftware.com/training for available classes.


How Flexera Software Professional Services Can Help
There are many considerations – technical, operational, and
commercial	–	when	designing	a	reliable	yet	flexible	update/
patching strategy. Flexera Software can assist you every step of
the way as the world leader in MSI technology with expertise
from our background as the developers of InstallShield. Find out
more at
www.flexerasoftware.com/services/consulting/software-
installations.htm.




10                                                                     Flexera Software: InstallShield White Paper Series
Flexera Software LLC                      Schaumburg                                United Kingdom (Europe,                   Japan (Asia,                              For more office locations visit:
1000 East Woodfield Road,                 (Global Headquarters):                    Middle East Headquarters):                Pacific Headquarters):                    www.flexerasoftware.com
Suite 400                                 +1 800-809-5659                           +44 870-871-1111                          +81 3-4360-8291
Schaumburg, IL 60173 USA                                                            +44 870-873-6300

Copyright © 2011 Flexera Software LLC. All other brand and product names mentioned herein may be the trademarks and registered trademarks of their respective owners.
                                                                                                                                                                         IA_WP_BuildPatchUpdate_Oct11

Weitere ähnliche Inhalte

Andere mochten auch

Virtual Property Manager: Providing a Simulated Learning Environment in a New...
Virtual Property Manager: Providing a Simulated Learning Environment in a New...Virtual Property Manager: Providing a Simulated Learning Environment in a New...
Virtual Property Manager: Providing a Simulated Learning Environment in a New...Andy Carswell
 
Communications
CommunicationsCommunications
CommunicationsJACKYXTREM
 
Storia dei sistemi di elaborazione
Storia dei sistemi di elaborazioneStoria dei sistemi di elaborazione
Storia dei sistemi di elaborazioneUniversita' di Bari
 
Tempoyak
TempoyakTempoyak
Tempoyakferloe
 
Hotpot Presentatie Stap Voor Stap
Hotpot Presentatie Stap Voor StapHotpot Presentatie Stap Voor Stap
Hotpot Presentatie Stap Voor StapAanzicht
 
Rent vs. Own Slide Show
Rent vs. Own Slide ShowRent vs. Own Slide Show
Rent vs. Own Slide ShowAndy Carswell
 
Homebuyer Assistance: Discovering Hidden Treasure
Homebuyer Assistance: Discovering Hidden TreasureHomebuyer Assistance: Discovering Hidden Treasure
Homebuyer Assistance: Discovering Hidden TreasureAndy Carswell
 
Pradip's childbooks and apps illustration 2015
Pradip's childbooks and apps illustration   2015Pradip's childbooks and apps illustration   2015
Pradip's childbooks and apps illustration 2015Freelancer
 
La Crosse Bike Summit Mar2010 Final
La Crosse Bike Summit Mar2010 FinalLa Crosse Bike Summit Mar2010 Final
La Crosse Bike Summit Mar2010 Finalckohner
 

Andere mochten auch (12)

Virtual Property Manager: Providing a Simulated Learning Environment in a New...
Virtual Property Manager: Providing a Simulated Learning Environment in a New...Virtual Property Manager: Providing a Simulated Learning Environment in a New...
Virtual Property Manager: Providing a Simulated Learning Environment in a New...
 
Communications
CommunicationsCommunications
Communications
 
Storia dei sistemi di elaborazione
Storia dei sistemi di elaborazioneStoria dei sistemi di elaborazione
Storia dei sistemi di elaborazione
 
Tempoyak
TempoyakTempoyak
Tempoyak
 
Hotpot Presentatie Stap Voor Stap
Hotpot Presentatie Stap Voor StapHotpot Presentatie Stap Voor Stap
Hotpot Presentatie Stap Voor Stap
 
Rent vs. Own Slide Show
Rent vs. Own Slide ShowRent vs. Own Slide Show
Rent vs. Own Slide Show
 
Bab 5
Bab 5Bab 5
Bab 5
 
Homebuyer Assistance: Discovering Hidden Treasure
Homebuyer Assistance: Discovering Hidden TreasureHomebuyer Assistance: Discovering Hidden Treasure
Homebuyer Assistance: Discovering Hidden Treasure
 
Pradip's childbooks and apps illustration 2015
Pradip's childbooks and apps illustration   2015Pradip's childbooks and apps illustration   2015
Pradip's childbooks and apps illustration 2015
 
La Crosse Bike Summit Mar2010 Final
La Crosse Bike Summit Mar2010 FinalLa Crosse Bike Summit Mar2010 Final
La Crosse Bike Summit Mar2010 Final
 
Remembering Our Cowboy
Remembering Our CowboyRemembering Our Cowboy
Remembering Our Cowboy
 
Sharepoint 2010 IT
Sharepoint 2010 ITSharepoint 2010 IT
Sharepoint 2010 IT
 

Mehr von Flexera

Get a Complete View of Your Business Services and IT Estate in ServiceNow wit...
Get a Complete View of Your Business Services and IT Estate in ServiceNow wit...Get a Complete View of Your Business Services and IT Estate in ServiceNow wit...
Get a Complete View of Your Business Services and IT Estate in ServiceNow wit...Flexera
 
Make Smarter Cloud Decisions at Every Step of Your Journey
Make Smarter Cloud Decisions at Every Step of Your JourneyMake Smarter Cloud Decisions at Every Step of Your Journey
Make Smarter Cloud Decisions at Every Step of Your JourneyFlexera
 
10 Tips to Optimize, Automate, and Govern your Hybrid IT Environment
10 Tips to Optimize, Automate, and Govern your Hybrid IT Environment10 Tips to Optimize, Automate, and Govern your Hybrid IT Environment
10 Tips to Optimize, Automate, and Govern your Hybrid IT EnvironmentFlexera
 
Using Automated Policies for SaaS Governance and Compliance
Using Automated Policies for SaaS Governance and ComplianceUsing Automated Policies for SaaS Governance and Compliance
Using Automated Policies for SaaS Governance and ComplianceFlexera
 
The Practical Approach for End-to-End SaaS Management
The Practical Approach for End-to-End SaaS ManagementThe Practical Approach for End-to-End SaaS Management
The Practical Approach for End-to-End SaaS ManagementFlexera
 
7 Things You Need to Know for Your Cloud-First Strategy
7 Things You Need to Know for Your Cloud-First Strategy7 Things You Need to Know for Your Cloud-First Strategy
7 Things You Need to Know for Your Cloud-First StrategyFlexera
 
The Role of In-House & External Counsel in Managing Open Source Software
The Role of In-House & External Counsel in Managing Open Source SoftwareThe Role of In-House & External Counsel in Managing Open Source Software
The Role of In-House & External Counsel in Managing Open Source SoftwareFlexera
 
Addressing Open Source Risks During M&A: A Legal View
Addressing Open Source Risks During M&A: A Legal ViewAddressing Open Source Risks During M&A: A Legal View
Addressing Open Source Risks During M&A: A Legal ViewFlexera
 
Having Trouble Managing All Your Cloud Services? We Know!
Having Trouble Managing All Your Cloud Services? We Know!Having Trouble Managing All Your Cloud Services? We Know!
Having Trouble Managing All Your Cloud Services? We Know!Flexera
 
Webinar: Maximizing the ROI of IT by Simplifying Technology Complexity
Webinar: Maximizing the ROI of IT by Simplifying Technology ComplexityWebinar: Maximizing the ROI of IT by Simplifying Technology Complexity
Webinar: Maximizing the ROI of IT by Simplifying Technology ComplexityFlexera
 
Webinar: What's New In FlexNet Manager Suite 2018 R1
Webinar: What's New In FlexNet Manager Suite 2018 R1Webinar: What's New In FlexNet Manager Suite 2018 R1
Webinar: What's New In FlexNet Manager Suite 2018 R1Flexera
 
Open Source Security - It can be done easily.
Open Source Security - It can be done easily.Open Source Security - It can be done easily.
Open Source Security - It can be done easily.Flexera
 
Software Distribution, Customer Experience and the IoT: Get Ready for Fast, S...
Software Distribution, Customer Experience and the IoT: Get Ready for Fast, S...Software Distribution, Customer Experience and the IoT: Get Ready for Fast, S...
Software Distribution, Customer Experience and the IoT: Get Ready for Fast, S...Flexera
 
Windows 10 webinar: What’s new for IT pros Windows 10 v 1709
Windows 10 webinar: What’s new for IT pros Windows 10 v 1709Windows 10 webinar: What’s new for IT pros Windows 10 v 1709
Windows 10 webinar: What’s new for IT pros Windows 10 v 1709Flexera
 
Don’t Let Hackers Breach Your Data: Shutting Your Risk Window on Apache Struts2
Don’t Let Hackers Breach Your Data:  Shutting Your Risk Window on Apache Struts2Don’t Let Hackers Breach Your Data:  Shutting Your Risk Window on Apache Struts2
Don’t Let Hackers Breach Your Data: Shutting Your Risk Window on Apache Struts2Flexera
 
BDNA joins Flexera
BDNA joins FlexeraBDNA joins Flexera
BDNA joins FlexeraFlexera
 
Flexera Event - The Game Has Changed - Are You Ready?
Flexera Event - The Game Has Changed - Are You Ready?Flexera Event - The Game Has Changed - Are You Ready?
Flexera Event - The Game Has Changed - Are You Ready?Flexera
 
Webinar: Take Proactive Control of Your SAP Licensing, Indirect Usage and Ven...
Webinar: Take Proactive Control of Your SAP Licensing, Indirect Usage and Ven...Webinar: Take Proactive Control of Your SAP Licensing, Indirect Usage and Ven...
Webinar: Take Proactive Control of Your SAP Licensing, Indirect Usage and Ven...Flexera
 
Keeping a Lid on Costs for Cloud Infrastructure and SaaS Applications
Keeping a Lid on Costs for Cloud Infrastructure and SaaS ApplicationsKeeping a Lid on Costs for Cloud Infrastructure and SaaS Applications
Keeping a Lid on Costs for Cloud Infrastructure and SaaS ApplicationsFlexera
 
Do You Manage Software? Understanding Your Role in Cybersecurity Defense
Do You Manage Software? Understanding Your Role in Cybersecurity DefenseDo You Manage Software? Understanding Your Role in Cybersecurity Defense
Do You Manage Software? Understanding Your Role in Cybersecurity DefenseFlexera
 

Mehr von Flexera (20)

Get a Complete View of Your Business Services and IT Estate in ServiceNow wit...
Get a Complete View of Your Business Services and IT Estate in ServiceNow wit...Get a Complete View of Your Business Services and IT Estate in ServiceNow wit...
Get a Complete View of Your Business Services and IT Estate in ServiceNow wit...
 
Make Smarter Cloud Decisions at Every Step of Your Journey
Make Smarter Cloud Decisions at Every Step of Your JourneyMake Smarter Cloud Decisions at Every Step of Your Journey
Make Smarter Cloud Decisions at Every Step of Your Journey
 
10 Tips to Optimize, Automate, and Govern your Hybrid IT Environment
10 Tips to Optimize, Automate, and Govern your Hybrid IT Environment10 Tips to Optimize, Automate, and Govern your Hybrid IT Environment
10 Tips to Optimize, Automate, and Govern your Hybrid IT Environment
 
Using Automated Policies for SaaS Governance and Compliance
Using Automated Policies for SaaS Governance and ComplianceUsing Automated Policies for SaaS Governance and Compliance
Using Automated Policies for SaaS Governance and Compliance
 
The Practical Approach for End-to-End SaaS Management
The Practical Approach for End-to-End SaaS ManagementThe Practical Approach for End-to-End SaaS Management
The Practical Approach for End-to-End SaaS Management
 
7 Things You Need to Know for Your Cloud-First Strategy
7 Things You Need to Know for Your Cloud-First Strategy7 Things You Need to Know for Your Cloud-First Strategy
7 Things You Need to Know for Your Cloud-First Strategy
 
The Role of In-House & External Counsel in Managing Open Source Software
The Role of In-House & External Counsel in Managing Open Source SoftwareThe Role of In-House & External Counsel in Managing Open Source Software
The Role of In-House & External Counsel in Managing Open Source Software
 
Addressing Open Source Risks During M&A: A Legal View
Addressing Open Source Risks During M&A: A Legal ViewAddressing Open Source Risks During M&A: A Legal View
Addressing Open Source Risks During M&A: A Legal View
 
Having Trouble Managing All Your Cloud Services? We Know!
Having Trouble Managing All Your Cloud Services? We Know!Having Trouble Managing All Your Cloud Services? We Know!
Having Trouble Managing All Your Cloud Services? We Know!
 
Webinar: Maximizing the ROI of IT by Simplifying Technology Complexity
Webinar: Maximizing the ROI of IT by Simplifying Technology ComplexityWebinar: Maximizing the ROI of IT by Simplifying Technology Complexity
Webinar: Maximizing the ROI of IT by Simplifying Technology Complexity
 
Webinar: What's New In FlexNet Manager Suite 2018 R1
Webinar: What's New In FlexNet Manager Suite 2018 R1Webinar: What's New In FlexNet Manager Suite 2018 R1
Webinar: What's New In FlexNet Manager Suite 2018 R1
 
Open Source Security - It can be done easily.
Open Source Security - It can be done easily.Open Source Security - It can be done easily.
Open Source Security - It can be done easily.
 
Software Distribution, Customer Experience and the IoT: Get Ready for Fast, S...
Software Distribution, Customer Experience and the IoT: Get Ready for Fast, S...Software Distribution, Customer Experience and the IoT: Get Ready for Fast, S...
Software Distribution, Customer Experience and the IoT: Get Ready for Fast, S...
 
Windows 10 webinar: What’s new for IT pros Windows 10 v 1709
Windows 10 webinar: What’s new for IT pros Windows 10 v 1709Windows 10 webinar: What’s new for IT pros Windows 10 v 1709
Windows 10 webinar: What’s new for IT pros Windows 10 v 1709
 
Don’t Let Hackers Breach Your Data: Shutting Your Risk Window on Apache Struts2
Don’t Let Hackers Breach Your Data:  Shutting Your Risk Window on Apache Struts2Don’t Let Hackers Breach Your Data:  Shutting Your Risk Window on Apache Struts2
Don’t Let Hackers Breach Your Data: Shutting Your Risk Window on Apache Struts2
 
BDNA joins Flexera
BDNA joins FlexeraBDNA joins Flexera
BDNA joins Flexera
 
Flexera Event - The Game Has Changed - Are You Ready?
Flexera Event - The Game Has Changed - Are You Ready?Flexera Event - The Game Has Changed - Are You Ready?
Flexera Event - The Game Has Changed - Are You Ready?
 
Webinar: Take Proactive Control of Your SAP Licensing, Indirect Usage and Ven...
Webinar: Take Proactive Control of Your SAP Licensing, Indirect Usage and Ven...Webinar: Take Proactive Control of Your SAP Licensing, Indirect Usage and Ven...
Webinar: Take Proactive Control of Your SAP Licensing, Indirect Usage and Ven...
 
Keeping a Lid on Costs for Cloud Infrastructure and SaaS Applications
Keeping a Lid on Costs for Cloud Infrastructure and SaaS ApplicationsKeeping a Lid on Costs for Cloud Infrastructure and SaaS Applications
Keeping a Lid on Costs for Cloud Infrastructure and SaaS Applications
 
Do You Manage Software? Understanding Your Role in Cybersecurity Defense
Do You Manage Software? Understanding Your Role in Cybersecurity DefenseDo You Manage Software? Understanding Your Role in Cybersecurity Defense
Do You Manage Software? Understanding Your Role in Cybersecurity Defense
 

Kürzlich hochgeladen

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Building MSI Updates and Patches

  • 1. Building MSI Updates W H I T E PA P E R and Patches by Robert Dickau Principal Technical Training Writer, Flexera Software
  • 2. Building MSI Updates and Patches Introduction gives you access to the raw MSI database tables. This white paper describes the changes you make to a It is also assumed you are familiar with some of the wizards Windows Installer (MSI) installation package for it to behave available with InstallShield, such as the Release Wizard and as the desired type of update or patch. It begins by discussing Component Wizard. information about settings to change in the MSI database. It also highlights the tools in InstallShield® by Flexera™ Software • he Release Wizard, available under the Build menu T that simplify the process. and also from the Releases view, lets you describe the properties—media type, compression settings, and so Also, if you haven’t read the white paper, “Designing an forth—of a release, and then builds the specified release Update-Friendly MSI Installation,” it has valuable tips on how image. to build your initial install. You can download it at • he Component Wizard, available by right-clicking a feature T www.flexerasoftware.com/whitepapers. in the Setup Design view, lets you create special types of components, such as components for COM servers, fonts, Using the InstallShield Environment and Windows services. This white paper frequently refers to the InstallShield development environment. It is assumed you are familiar with the The InstallShield Help Library contains information about using general layout of the InstallShield interface, which contains a list every view and wizard in the InstallShield environment. The of views with which you can modify different portions of your InstallShield Help Library is available when you press F1 with installation project. any view selected; you can also select Contents from the Help menu to view the help library. In addition to the graphical environment, InstallShield provides several tools for modifying and building projects from the command line or an external script. For example, to build a project from the command line, batch file, or other automated process, you can use the executable IsCmdBld.exe. The IsCmdBld executable is located in the System subdirectory of the InstallShield distribution directory. To rebuild a project, you pass IsCmdBld the project file path, the product configuration name, and the release name that you want to rebuild. A sample command appears as follows: scmdbld -p C:ProductName.ism -a BuildConfig -r i ReleaseName For example, the General Information view is where you set general product and project properties; the Setup Design view enables you In addition, InstallShield provides an Automation interface, with to edit the features, components, and component data used by your which you can modify the contents of a project file without using project; the Registry view enables you to modify the registry data the graphical environment. installed by your installation program; and the Direct Editor view 2 Flexera Software: InstallShield White Paper Series
  • 3. Building MSI Updates and Patches • pgradeCode: MSI property containing a GUID U Learn More about InstallShield: represent ing t he current product “family”; in t he If you wish to learn more about the capabilities of major-upgrade process, if two products have different InstallShield, please visit the Flexera Software Web site ProductCode values but t he same UpgradeCode value, at http://www.flexerasoftware.com/installshield MSI knows t hat t he products are related, and are t herefore candidates for t he major-upgrade process. In general, t he Review of Upgrade Types upgrade code value never changes. Windows Installer supports three types of product upgrades: small updates, minor upgrades, and major upgrades. The three When you design different types of upgrades, you must change types of upgrades are defined as follows. different combinat ions of t hese codes. The following table summarizes t he required changes. • small update consists of product changes, such as hot A fixes, so small t hat no change to t he product version is Package Product Product Upgrade code (SIS) Version Code Code necessary or desired. (A drawback to small updates is t hat external programs, including installers for later versions of Small X your product, will not be able to dist inguish a product wit h update t he small update applied from one wit hout t he Minor small update.) X X upgrade • minor upgrade is a change to the product large enough A Major to merit a change to the product version, such as updating X X (usually) X upgrade version 1.1 to 1.2, but in which there have been no significant changes to the setup organization between versions. The install-time behavior of a minor upgrade is to Inside InstallShield, the package code is exposed in the install over the existing product. Summary Information Stream view, under General Information. • A major upgrade includes substantial product changes, such as updating version 1.2 to 2.0. A major upgrade can contain significant changes to the setup architecture; later. The install-time behavior of a major upgrade can be to uninstall the earlier version and install the new one, or to install over the earlier version and then remove any leftover data. In this view, you can select the Package Code setting and click NOTE: For an earlier product version that was installed with a the Generate GUID button (not pictured). legacy (non–Windows Installer) setup, a custom action will normally be required to uninstall or modify the existing product installation. Because the package code should change for every new release, the default behavior of InstallShield is to generate a MSI Codes and Updates new package code each time you perform a build. You can Every MSI database contains a handful of codes that identify the modify this behavior by selecting a product configuration icon in product being installed. the Releases view, and setting Generate Package Code to No, though doing so is strongly discouraged. • ackage Code: part of t he Summary Informat ion Stream, P t he package code ident ifies a part icular database. Any two MSI databases wit h ident ical package codes must have ident ical contents, and t herefore you should change t he package code for each build. • roductVersion: MSI property storing t he product version. P Note t hat MSI uses only t he first t hree fields of t he ProductVersion property for version comparisons: in a.b.c.d, t he field d is ignored. (Note t hat t his is true just Note that you can also use this view to specify a product version, for comparisons of ProductVersion values, and not for file product code, and other properties for the current product-build versions. File-version comparisons can use all four fields of configuration. If you enter a specific value here, it automatically a file’s version.) overrides the value in the Product Properties view. • roductCode: MSI property containing the GUID for the P current product. MSI treats two products with different ProductCode GUIDs as unrelated, even if ProductName is the same. (As you will see, the major-upgrade process instructs MSI to treat two products with different GUIDs as related.) Flexera Software: InstallShield White Paper Series 3
  • 4. Building MSI Updates and Patches The other settings—Version, Product Code, and Upgrade Installer runs Code—are exposed in the Product Properties view, also under the installer based on the cached version of the existing earlier General Information. product version. NOTE: You must take care not to set REINSTALL=ALL for a first-time installation. Later you will see how InstallShield can create a setup launcher that sets REINSTALL dependent on whether an earlier version of the product is present on the target system. To change the Version setting, simply type in the updated Major Upgrades value. To change Product Code (for a major upgrade), you can For a major upgrade, as indicated in the earlier table, you select the property and then click the Generate GUID button must change the package code (in the Summary Information (not pictured). These settings are also available in the Property Stream); you will usually change the product version (in the Manager, in the Behavior and Logic view group. ProductVersion property in the Property table); and now must also change the product code (the ProductCode property in the TIP: An advanced technique is to modify a project’s version Property table). and GUIDs using the InstallShield Automation interface, which provides a GenerateGUID method. For more information, see When you change the product code, Windows Installer treats the InstallShield Help Library. your latest and previous product versions as unrelated, even though the ProductName values are likely the same. If you Creating Update Packages want both versions of your product to be installable on the This section describes the database changes required for same system, you can simply change the product code and different types of updates, and describes how to use the tools the main installation directory (often INSTALLDIR). (Naturally, provided in InstallShield to simplify the update-development the application must have been developed to support process. multiple simultaneous instances by separating each instance’s configuration settings and data files.) Minor Upgrades As listed in the table above, in addition to the new files and If instead you want your latest product version to supersede other data in your update package, to create a minor upgrade an earlier installed version, you will populate records in the you must change the package code and product version of your Upgrade table. A record in the Upgrade table contains the installer. following fields: NOTE: By default, when you run an installation from the • he UpgradeCode value of the product(s) you want T InstallShield environment by clicking the Run toolbar button, to update. InstallShield will quietly uninstall any previous version of your • A range of versions of products to update. product present on the development machine. To change this • ptional language information for the product to update. O setting so that deploying an installation from the environment will • n optional list of features to remove. A use the default MSI behavior, pull down the Tools menu, select • public property (called an “action property”) associated A Options, select the Preferences tab, and clear the check box with any products to update. labeled “Uninstall before installing”. A sample record in the Upgrade table might appear To deploy the minor upgrade, a typical command line is as follows. the following: msiexec /i product.msi REINSTALLMODE=voums UpgradeCode {11111111-2222-3333-4444-555555555555} REINSTALL=ALL VersionMin 1.0.0 If the update contains features that you do not want to update, you should set REINSTALL to a comma-separated list of the VersionMax 2.0.0 features that you do want to update, as in the following Language command (names you use in the REINSTALL property are Attributes 1025 case-sensitive): Remove msiexec /i product.msi REINSTALLMODE=voums ActionProperty OLDPRODUCTS REINSTALL=F1,F3,F5 The bit flags used in the Attributes field are described in the MSI The important setting for deploying a minor upgrade is the Help Library page “Upgrade Table”. The value 1025 used here REINSTALLMODE flag “v”, which indicates to run the installer means that all languages should be detected (1024) and that using the updated MSI database and to re-cache the package feature states should be migrated (1) from the installed product based on the new database. Without the “v” flag, Windows to the latest product. 4 Flexera Software: InstallShield White Paper Series
  • 5. Building MSI Updates and Patches In addition to adding records to the Upgrade table, some further RelatedProducts property of the MSI Automation interface. authoring steps required are to: When you define a major upgrade, it can be useful to run MSI • dd the action property name to the value of the A validation on your upgrade package. The rules ICE61, ICE63, SecureCustomProperties property. and ICE74 can detect package-authoring errors related to major • nsure the value of ALLUSERS is the same in the before and E upgrade packages. By default, InstallShield performs upgrade after versions, through a custom action or from the validation during the build process to flag common authoring command line. problems with the different types of upgrades. TIP: Because the packages involved in a major upgrade have To deploy a major upgrade package, the user can simply launch different product codes, you cannot use the MSI property the MSI database or setup launcher, without needing to set any “Installed” to determine if the earlier version of your product special values for REINSTALLMODE or REINSTALL. is present on the target system. Instead, the older product version can determine if it is being removed because of a major InstallShield Upgrades View upgrade using the UPGRADINGPRODUCTCODE property; the To simplify the process of creating minor and major upgrades, newer version can use the action property (say, OLDPRODUCTS) InstallShield provides the Upgrades view, in which you specify that you defined in the Upgrade table. your latest product version and the earlier packages you want it to update. At run time, the standard MSI action FindRelatedProducts reads the records in the Upgrade table, and, if a related product is found, the product code for that product is added to the action property. FindRelatedProducts is by default placed early in both the User Interface and Execute sequences. The MigrateFeatureStates action (if appropriate) attempts to migrate the feature-selection states from an installed product version to the newer version. Finally, the standard RemoveExistingProducts action reads the product codes stored in the Upgrade table action property, and in effect performs silent nested-uninstallation actions on those products. The RemoveExistingProducts action can be placed in different In the Upgrades view, you can define a “minor upgrade item” or locations to define different types of upgrade behavior. In a “major upgrade item”. (There is also an “automatic upgrade short, placing RemoveExistingProducts early in the Execute item”, which determines which type of upgrade to create based sequence instructs Windows Installer to completely remove the on the earlier and later packages you specify. Automatic existing product data before installing the new product. Placing upgrade items will not be discussed here.) The two types of RemoveExistingProducts late in the Execute sequence causes the upgrade items are described in the following sections. upgrade to install the new product data, and then remove old data. For more information about the different types of upgrades, you can select the appropriate help icon under the Additional TIP: The Attributes field of the Upgrade table also supports a Information icon, pictured in the figure above. detect-only bit (value 2). If an Upgrade record has the detect- only bit set, the action property defined in that record will be Creating Minor Upgrades with InstallShield populated with the product codes of corresponding product When you create a minor upgrade item, a general setting versions, but the RemoveExistingProducts action will not remove you can modify is how a setup launcher should behave if an those products. The detect-only bit is useful, for example, when earlier product version is present. You can modify this setting creating a custom action that prevents an older version of the by selecting the Upgrade Windows Installer Setup icon and product from installing over a newer version. Recent InstallShield reviewing the Small/Minor Upgrade Settings section of the IDE, versions automatically create such an Upgrade-table record and as pictured in the following figure. custom action for new Basic MSI projects. For more information about creating such a custom action, see the MSI Help Library page “How do I prevent an old package from installing over a newer version?” TIP: If you use the same UpgradeCode value for every release of your product, an external program or custom action can determine the product codes of any installed copies of your product using the MSI API MsiEnumRelatedProducts, or the Flexera Software: InstallShield White Paper Series 5
  • 6. Building MSI Updates and Patches As you have seen, a minor upgrade package requires the Creating Major Upgrades with InstallShield REINSTALLMODE and REINSTALL properties to be set during When you create a major upgrade item, a general setting you deployment. If your build configuration included a Setup.exe can modify is where to schedule the RemoveExistingProducts setup launcher, you can select one of the following settings: action. You can modify this setting by selecting the Upgrade Windows Installer Setup icon and reviewing the Major Upgrade • Disable: this setting causes Setup.exe not to set Settings section of the IDE, as pictured in the following figure. REINSTALLMODE and REINSTALL if the launcher discovers an earlier version of the product on the target system. With this setting, you must manually set REINSTALLMODE and REINSTALL through other means. • on’t prompt the user, just install the upgrade: this setting D causes Setup.exe to set REINSTALLMODE to “voums” and REINSTALL to “ALL” if an earlier product version is detected, and otherwise just behaves as a first-time installation. • Prompt: this setting (the default) causes Setup.exe to display a message to the user if an earlier version exists, prompting whether to update the setup. If the user agrees, Setup.exe sets REINSTALLMODE and REINSTALL as in the To create a major-upgrade item, right-click the Upgrade previous setting. If no earlier version exists, no prompt is Windows Installer Setup icon and select Add Major Upgrade displayed, and the setup behaves as a first-time installation. Item. You can rename the icon to describe the latest version of your setup, as in “V200”. To create a minor upgrade item, right-click the Upgrade Windows Installer Setup icon and select Add Minor Upgrade The properties for your major-upgrade item are a more user- Item. If desired, you can rename the new icon to represent the friendly view of the Upgrade table settings. In the Common earlier version of your product, as in “Version100”. In the “Setup tab for a major-upgrade item (pictured below), you specify the to Upgrade” field, browse for the MSI database for the earlier Upgrade Code value of the products you want to update, as well product version that you want to update. as the versions of product you want to update. If you are creating an upgrade that can update more than one previous version, you can right-click the Upgrade Windows Installer Setup icon and create additional minor-upgrade items. After having created one or more minor-upgrade items, Designing an Update-Friendly Installation whenever you build a media set, by default InstallShield will (The existing item ISPreventDowngrade is provided by perform validation on the latest and earlier product versions, InstallShield to prevent an older version of a product from being alerting you to possible errors in the upgrade settings. installed over a newer version.) If you built your updated version to include Setup.exe, and set In the Advanced tab for a major-upgrade item, you can specify the minor upgrade settings to prompt the user whether to update other settings to be written to the Upgrade table, such as the a product, the user will see the following prompt, name of the action property (by default “ISACTIONPROP1”), if appropriate. whether to remove only certain features, and so forth. 6 Flexera Software: InstallShield White Paper Series
  • 7. Building MSI Updates and Patches At build time, InstallShield by default includes an ISSetAllUsers You run a patch using a command line similar to the following: custom action to manage setting ALLUSERS correctly during a major upgrade. (In addition, ISSetAllUsers sets the custom msiexec /p patch.msp REINSTALLMODE=oums REINSTALL=ALL property IS_MAJOR_UPGRADE if a major upgrade is taking place.) To control whether to include the ISSetAllUsers action, It is not necessary to specify the product to which the patch pull down the Tools menu, select Options, and activate the applies; if the user does not have an appropriate target General tab. You can clear or select the “Automatically create product version installed, the following error dialog box will be ISSetAllUsers action” check box. displayed. To deploy a major upgrade, a user can simply launch the MSI file or setup launcher. No special command-line settings are required. If a related earlier product version is detected, it will be removed; if no earlier version is detected, the setup will behave as a first-time installation. Creating Patches A patch is a packaging mechanism for an upgrade. After you have created an upgrade—usually a minor upgrade—as described above, you can build a patch for it. The earlier product databases for which you want to build a patch are QuickPatch® Projects commonly called the target databases, and the latest version is A QuickPatch project enables you to quickly create a patch for commonly called the upgraded package. an existing MSI package, where the patch contains only file and registry changes. In a QuickPatch project, you can add, PCP Files modify, or remove files and registry data; if you need the patch InstallShield uses Patch Creation Property (PCP) files to store to include additional changes, you should use the Patch Design settings for a patch to be created. These settings include, among view, described in the following section. many others: To create a new QuickPatch project in InstallShield, you can pull • GUID for the patch A down the File menu, select New, and then select QuickPatch • ProductCode values for products the patch will update Project, entering the name of the InstallShield project (ISM) file • A list of patches that the current patch supersedes to create. • ocations of uncompressed source and target L MSI packages In the QuickPatch Project Base panel, you are prompted to base the patch on an existing MSI package or on an existing A PCP file uses the MSI format, and can be edited directly with QuickPatch project. InstallShield or Orca; the standard tables and fields of a PCP file are described in the MSI Help Library. The four required tables in a PCP file are the following: • roperties: contains global settings for the patch, such P as the patch GUID, the path to the patch-creation output directory, whether to include only entire files, and so forth. • mageFamilies: contains an identifier for a group of related I target and updated images. • argetImages: describes the target MSI packages involved T in the patch. • pgradedImages: describes the upgraded packages U involved in the patch. TIP: Given a product’s ProductCode value, you can determine which patches have been applied to it by using the MSI API You will then be prompted for the original database or project, function MsiEnumPatches, or the MSI Automation interface creating an uncompressed image of your installation package property Patches. if necessary. Flexera Software: InstallShield White Paper Series 7
  • 8. Building MSI Updates and Patches In the Files view, you see a tree of the destination folders used by your project, and the files in them. Selecting a file icon in the Original Setup Files tree displays the file’s destination and version information, as pictured in the following figure. In this view, you can change, add, and remove files. To update a file, drag its icon from the Original Setup Files tree to the Files to Patch tree. When you select the file icon in the Files to Patch tree, in the Update File area you then browse for the newer In the IDE for a QuickPatch project, the Patch Settings view version of the file. group contains views in which you can edit the general information, files, and registry data to be included in the patch. In the General Information view, the Product Properties section is where you can view and modify the location of the Windows Installer package for which the patch is being generated, the patch version information, and optional Update Service information. Note that a file installed by a patch by default obeys the file-overwrite rules. If you want, you can select the Overwrite Any Existing File check box to include the entire updated file in the patch (as opposed to just the byte-level binary differences). This setting causes your file to overwrite any earlier version of the file on the target system in the case of a versioned file, or overwrite any existing file in the case of an unversioned file. In the Build Settings view (not pictured), you specify such settings as: You can also delete the file from the setup using your patch by selecting the “delete this file” check box at the bottom of the • here to place the build output (the MSP file, and W file-information view. so forth). • hether to build an Update.exe launcher, which launches W To add a new file to the product using your patch, right-click the patch file with the appropriate REINSTALLMODE and the Files to Patch icon and select Insert New File. You will be REINSTALL values. prompted to browse for the new file; afterward, you can specify • hether to include the MSI, InstallScript, or .NET W the file’s destination and the features with which the new file is redistributables with your patch launcher. associated. • here to obtain any redistributables you selected: either W built into Update.exe or downloaded from a URL. Use of the Registry view (not pictured) follows similarly. In the Registry view, you see a tree of registry data contained in In the History and Custom Actions views (not pictured), you the earlier product version, as well as a tree representing the can view and modify the base and intermediate projects that registry data on the development system. You can then add, your current patch applies to, and specify if any of your custom remove, and modify registry keys and values relative to actions should be set up not to run while your patch is the original package, and the patch will include the being applied. appropriate changes. 8 Flexera Software: InstallShield White Paper Series
  • 9. Building MSI Updates and Patches To build the patch, simply click the Build toolbar button. By default, recent versions of InstallShield will perform upgrade and patch validation. When the build is complete, you can open the folder containing the build output by clicking the Open Release Folder toolbar button. The output directory includes the patch (MSP file) or Update.exe, the build log, and so forth. Using the Patch Design View The InstallShield Patch Design view provides a more sophisticated environment for creating patches. Unlike QuickPatch projects, which are a separate project type, the Patch Design view is associated with an existing project. In the Patch Design view, it is assumed you have already built the projects for your earlier and later product versions. In the Latest Setup Path field, you can use the variable <ISLatestRelease> for InstallShield always to use the latest build NOTE: When running the Release Wizard for your new product of your setup as the upgraded image. Alternatively, you can version, you will want to use patch optimization, especially if browse for a specific latest version’s MSI database or Setup.exe any of your components have used dynamic file linking that launcher. The release you select here should be an uncompressed includes subfolders. release, ideally created with an administrative installation if the previous product versions were compressed. To create a patch, you begin by right-clicking the Patch Design icon and selecting Add New Patch Configuration. A patch In addition, you can use the Include Whole Files section to configuration consists of one “Latest Setup” and one or more specify particular files to include as whole files; the default “Previous Setups”. Before you specify the latest and previous behavior is to include the byte-level file differences, where setups, you can specify overall patch properties, such as where possible. Including some files as whole files can suppress certain to store the built patch data, whether to create a patch launcher prompts for the original installation source while the patch is Update.exe, and so forth. being applied. Under the latest-setup icon are folders labeled Previous Setups and Additional External Files. In the Previous Setups folder, you add the target images for the current patch. You can begin by right-clicking the Previous Setups icon and selecting Add New Previous Setup, if desired renaming the new icon. InstallShield automatically provides one icon for a previous setup. In the Previous Setup Path field, you browse for the earlier In the Advanced tab for a patch configuration (not pictured), version’s MSI database or Setup.exe launcher. Because the you can specify additional settings to write to the PCP file, such patch-creation process requires an uncompressed release, you as a fixed patch GUID, whether to include only entire files, and will be prompted for a location to decompress the previous so forth. In addition, the Identification, Digital Signature, and version, if necessary. Sequence tabs enable you to take advantage of uninstallable patches and patch sequences, introduced in recent versions of In the Advanced tab for a previous version (not pictured), you Windows Installer. can specify settings such as the version relationship required between the latest and previous versions, and which product- To specify the latest version (the updated image) of your package, version fields to check to determine if a patch is appropriate right-click the patch configuration icon and select Add New Latest for a particular product version on the target system. Recent Setup. InstallShield automatically provides one latest setup project, InstallShield versions support streamlining a QuickPatch which you can rename if desired. package, which removes subfeatures and custom actions that are unnecessary for simple QuickPatch projects. Flexera Software: InstallShield White Paper Series 9
  • 10. Building MSI Updates and Patches In the Additional External Files folder, you can specify files that you want to patch, but which were not installed by your previous setups. The data you enter here is written to the optional ExternalFiles table of your PCP file. Finally, to build the patch, select the patch-configuration icon and click the Build the Patch button. The build will return an error and exit if your latest setup version was built compressed. By default, InstallShield will also perform upgrade and patch validation. Moreover, recent versions of IsCmdBld support a -patch_config switch for building patches from the command line. TIP: In Windows, you can right-click a built .msp patch file and select Edit with InstallShield to launch the Open MSP Wizard, with which you can view and edit the package changes contained in a patch file. NOTE: Deploying an effective minor upgrade—either as a full installation package or as a patch—requires the REINSTALL and REINSTALLMODE properties to be set. You have seen how these properties can be set at the command line, and how InstallShield can create a setup launcher that populates the properties. In addition, the properties can be set by custom actions or control events inside the running installation. The one exception is that the “v” flag for REINSTALLMODE, which indicates to re-cache the updated MSI database during a minor upgrade packaged as a full installation database, must be set outside the installation program, and cannot be changed from within a running installation. Summary This white paper discusses how to create minor and major upgrades, and how to package updates as full installation databases or as patches. Begin a Free Evaluation of InstallShield: You can download a free trial version of InstallShield from the Flexera Software Web site at: www.flexerasoftware.com/installshield/eval Want to learn more best practices for building quality installations? Join an InstallShield training class – visit www.flexerasoftware.com/training for available classes. How Flexera Software Professional Services Can Help There are many considerations – technical, operational, and commercial – when designing a reliable yet flexible update/ patching strategy. Flexera Software can assist you every step of the way as the world leader in MSI technology with expertise from our background as the developers of InstallShield. Find out more at www.flexerasoftware.com/services/consulting/software- installations.htm. 10 Flexera Software: InstallShield White Paper Series
  • 11. Flexera Software LLC Schaumburg United Kingdom (Europe, Japan (Asia, For more office locations visit: 1000 East Woodfield Road, (Global Headquarters): Middle East Headquarters): Pacific Headquarters): www.flexerasoftware.com Suite 400 +1 800-809-5659 +44 870-871-1111 +81 3-4360-8291 Schaumburg, IL 60173 USA +44 870-873-6300 Copyright © 2011 Flexera Software LLC. All other brand and product names mentioned herein may be the trademarks and registered trademarks of their respective owners. IA_WP_BuildPatchUpdate_Oct11