Browse Prior Art Database

Asynchronously Moving InstallShield 5.1 Progress Bar

IP.com Disclosure Number: IPCOM000123521D
Original Publication Date: 1998-Dec-01
Included in the Prior Art Database: 2005-Apr-04
Document File: 4 page(s) / 187K

Publishing Venue

IBM

Related People

Price, S: AUTHOR

Abstract

InstallShield* 5.1 for Windows NT** and Windows 95** - a product of InstallShield Corporation - is designed for generating softward product installation programs ("setups"), which are script-driven. One feature of InstallShield is the "progress bar", which can be displayed to show the user how far the installation procedure has progressed both as a percentage figure and as a graphical object. The progress bar can be moved by the setup using two methods: manually, that is under direct control of the developer's setup script, and automatically by InstallShield when the script invokes one of the InstallShield file transfer functions to copy files to the user's system.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 28% of the total text.

Asynchronously Moving InstallShield 5.1 Progress Bar

   InstallShield* 5.1 for Windows NT** and Windows 95** - a
product of InstallShield Corporation - is designed for generating
softward product installation programs ("setups"), which are
script-driven.  One feature of InstallShield is the "progress bar",
which can be displayed to show the user how far the installation
procedure has progressed both as a percentage figure and as a
graphical object.  The progress bar can be moved by the setup using
two methods: manually, that is under direct control of the
developer's setup script, and automatically by InstallShield when the
script invokes one of the InstallShield file transfer functions to
copy files to the user's system.  For a satisfying user experience,
the progress bar needs to move smoothly from start to finish (0 to
100 percent), but it can normally be moved only between script
operations because the script is single-threaded.  So if a script
operation takes ten seconds say, then the progress bar would be
static during that time and would jump to its next position when the
script operation finishes.

   The algorithms and program routines described here may be
implemented in InstallShield script language and "C" code, to enable
the progress bar to be moved fairly smoothly during the operation of
long running external routines.  Also described is a method for
ensuring that each part of the installation is allocated a suitable
proportion of the progress bar.  If an installation part finishes
sooner than expected, its remaining unused portion of the progress
bar is automatically re-allocated to the remaining installation
parts.

   Implementation involves the following elements:
  o  nPerCent
  o  nProgressDelay
  o  ProgressBarRegister()
  o  ProgressOn()
  o  ProgressBarBegin()
  o  ProgressBarEnd()
  o  ProgressBarTerm()
  o  GetMilliSeconds()
  o  IncrementPerCent()
  o  CalculateProgressDelay()
  o  LaunchAsyncExe()
  o  IsExeComplete()
  o  IsThreadComplete()
  o  GoToSleep()
  o  ProgressFile
  nPerCent

   This global variable contains the current percentage
position of the progress bar.  It is updated or referenced by most of
the program routines.
  ProgressDelay

   This global variable contains the time in milliseconds
between each progress bar increment.  It is recalculated at the
beginning of each installation task.
  GetMilliSeconds()

   This routine is a service routine that calls an external
(non-InstallShield) routine to return the current time in
milliseconds.  InstallShield does not have a function for returning
the time in milliseconds.
  CalculateProgressDelay()

   This routine calculates the progress delay, nProgressDelay,
that is the elapsed time between each remaining increment of the
progress bar.  The GoToSleep() routine can be used to sleep for this
length of time (while a task is running asynchronously) before
incrementing the progress bar position.  Note t...