nightfir opened this issue on May 26, 2007 · 8 posts
nightfir posted Sat, 26 May 2007 at 1:29 PM
**More info:
Chapter 20**
Automating Installer VISE
This chapter describes ways to automate the processes of building and controlling Installer
VISE installers. The information is divided into two main topics:
■
“Automating Installer Builds” on page 20-1■
“Automating Installers” on page 20-2Automating Installer
Builds
You can automate the process of building installers by using combinations of the features
listed below.
Build Targets and
Batch Build
Build Targets allow you to set up different kinds of installs and easily switch between them
when building. While the default behavior is to build one Build Target at a time, build
automation can be achieved by using Installer VISE's Batch Build feature. Batch Build
enables multiple Build Targets to be built at once. For details, see:
■
“Build Targets” on page 15-5■
“Batch Build” on page 15-9Batch Files
in the archive and build your installer:
There are two command line switches that can be used with Installer VISE to update filesCommand
Line Switch
Function
- u Causes Installer VISE to update a file in the specified archive.
Example:
D:MyProductBuilderReleaseMyApp.exe
- b Causes Installer VISE to build an installer from the specified archive
and save it at a specified location. This command line switch can
specify the Build Target for the installer.
F:tempfile.vct -b F:tempsetup.exe target1
InstVise.exe F:tempMyProduct.VCT -u MyApp.exeExample: InstVise.exe****Table 20-1: Command line switches for building installers
20–2 Automating Installers
Chapter 20 Automating Installer VISE Installer VISE for Windows
Through a command available in its File menu, Installer VISE can generate a batch file for
you that updates specific files and builds an installer at the location you specify. You can
use this file in conjunction with other batch files to automate your build process.
For details, see
**“Generating a Batch File” on page 6-46.**Automating
Installers
Installer VISE installers can be controlled through the following command line switches,
which for convenience and automation purposes will typically be used in batch files:
Command
Line Switch
Function
-s Causes the installer to silently process any items in its Silent Setup
package. The purpose is to provide an install that can be used with a
batch file; no customer intervention is required and no dialogs are
displayed.
See
page 6-7
-t Causes the installer to use the specified path as the default target
directory.
****Example: setup.exe -s“Creating Packages, Sub-Packages and List Packages” on.****Example:
See
-v Causes the installer to use any runtime variable values present in the
specified INI file.
**setup.exe -t:"C:Program FilesMy Application"“Externally Setting %TargetDir%” on page 19-9.**Example:
See
-r Causes the installer to use the specified INI file to record the
settings made by the user during the install. The recorded install can
then be played back with the -p command line switch.
**setup.exe -v: varsettings.ini“Externally Setting Variables” on page 19-8.**Example:
See
-p Causes the installer to silently play back a previously recorded install
using the user settings stored in the specified INI file. (User settings
are recorded using the -r command line switch.)
**setup.exe -r: recsettings.ini“Recording and Playing Back Installs” on page 20-3.**Example:
See
-l (lowercase L) For use by an application, this command line switch causes the
installer to send progress notification messages to the specified
window.
**setup.exe -p: recsettings.ini“Recording and Playing Back Installs” on page 20-3.**Example:
See
-n For use by an application, this command line switch can optionally
be used in conjunction with the -l switch to identify the installer that
is sending progress notification messages.
**setup.exe -l listener“Monitoring Installer Progress” on page 20-4.**Example:
See
**setup.exe -l listener -n reporter“Monitoring Installer Progress” on page 20-4.**Table 20-2: Command line switches for controlling installers
Recording and Playing Back Installs 20–3
Installer VISE for Windows Chapter 20 Automating Installer VISE
Recording and Playing
Back Installs
This feature enables customers who use your installer to automate the installation process.
For example:
■
your software on multiple computers in a network.
Systems administrators could use record and playback to control installation of■
for inclusion with their products.
Although you might not use this feature as a developer, you might want to provide the
following information to select customers who have a need to control the installation of
your software.
Third-party developers could use the feature to automate your installer as neededHow it Works
and playback does not require the user to repackage the installer with Installer VISE.
Instead, customers can simply run your installer once using a special command line switch
that records all user settings, such as package selection and text input. The installer can
then be launched on another machine and run silently without user intervention.
In contrast to the Snapshot Wizard (see Chapter 14-Using the Snapshot Wizard), recordTo record an install:
1.
setup.exe -r: recsettings.ini
The user settings will be recorded to the INI file specified here.
**Launch the installer with a command line that follows this format:**2.
record for automation purposes.
The resulting INI file can be manually revised to preset runtime variable
values, using the format described in
page 19-8
Password verification (when entry is prompted by the Verify Password
installer screen) is skipped over during playback.
Once an install is recorded, different variations can be created by making
copies of the INI file and modifying the contents as needed.
**Complete the installation process using the selections and input you would like to“Externally Setting Variables” on.**To play back an install:
Launch the installer with a command line that follows this format:
setup.exe -p: recsettings.ini
Be sure to reference the INI file that has the desired user settings.
20–4 Monitoring Installer Progress
Chapter 20 Automating Installer VISE Installer VISE for Windows
Monitoring Installer
Progress
The following information describes how applications can launch one or more installers
and monitor their progress through messages sent by the installers. This feature can be
used in conjunction with the installer playback functionality.
To monitor an installer’s progress, the application source code must:
1.
**Create a message handler.**2.
from the installer.
Associate the handler with a (possibly hidden) window for receiving progress messages3.
setup.exe -l listener -n reporter -p settings.ini
The -l (lowercase L) switch, and the name that follows, signals the request for
progress notification. The name should be the name of a (probably hidden) window
that the application opens for the purpose of receiving and handling notification
messages sent by the installer.
The -n switch, and the name that follows, is optional. If present, the installer will
use the name provided to identify itself in notification messages it sends. Thus, by
naming at command line launch, one application could be monitoring multiple
installers (or multiple applications monitoring multiple launches of the same
installer) simultaneously, without confusion or collision.
The -p switch, and the name that follows, is also optional. It simply illustrates how
the notification feature might be used in conjunction with the playback feature.
**Launch the installer with a command line that follows this format:**Events Reported by
Installers
The events an installer will report are as follows:
■
Begin install■
Successful completion of install■
Cancel or abort install■
**Update of the progress bar (whether hidden or not)**Finding More
Information
For more information on this feature, see the Vise Monitor folder that’s available as part
of the Installer VISE installation. This folder includes the following valuable reference
items:
■
Read Me file■
Sample application■
Sample application project