Browse Prior Art Database

Access to Properties in MSI Deferred-Execution Custom Actions.

IP.com Disclosure Number: IPCOM000014743D
Original Publication Date: 2001-Jun-16
Included in the Prior Art Database: 2003-Jun-20
Document File: 2 page(s) / 49K

Publishing Venue

IBM

Abstract

A program is disclosed that enables MSI custom actions executing in deferred mode to have easy access to multiple properties.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 52% of the total text.

Page 1 of 2

Access to Properties in MSI Deferred-Execution Custom Actions.

A program is disclosed that enables MSI custom actions executing in deferred mode to have easy access to multiple properties.

     MSI (Microsoft* Installer) is an emerging method of installing software on Microsoft Windows systems. Installing using MSI is a Microsoft Windows* 2000 logo certification requirement for certain types of product, or soon will soon be. During an MSI installation, user-written code ("Custom Actions") can be invoked to perform tasks that MSI cannot handle. Custom actions (CA's), typically DLL functions, can be invoked in several distinct phases (modes) of execution. When in deferred execution mode, a (CA) has very limited acces to "properties". Properties, which are managed by MSI, contain system and application information to which a CA might need access to accomplish its task. Typically, a property would contain a path, information collected from the user, or any other textual information desired. A CA must issue an MsiGetProperty() call to get the value of a particular property. Normally a CA - which runs in an MSI-controlled environment - has access only to one property, whose name is the same as the CA. Any information that the CA needs must be pre-stored in that one property by an earlier action. Unfortunately, properties can contain up to only 256 bytes of data. This is insufficient for many tasks; for instance a single Windows path can be 256 bytes long, leaving no room for more information.

     This program provides a mechanism for deferred-execution custom actions to gain access to any desired property easily. Furthermore, the mechanism works also in modes other than deferred execution, allowing a developer to change a CA's mode with no coding changes.

     The program works by saving the values of any properties that CA's might need in a temporary file. A CA, instead of calling MsiGetProperty(), issues a GETPROPERTY macro. This macro determines the mode of execution (deferred or not) and either issues MsiGetProperty() or gets the required property value from the temporary file.

   The program consists of the following components: A type-51 CA that defines the list of properties to be made available to

deferred-execution CA's. This CA is executed at the end of the script-generating phase of the MSI sequence (before deferred-execution mode). It sets a property, called say "PROPERTYNAMELIST", to a value containing a list of names of properties that are to be made available to deferred-execution CA's. The list just contains property names and separators (a semi-colon is suggested as a separator). An example is: "INSTALLDIR;USERNAME;SetupType;". This CA requires no user code because setting a property to a value (a type-51 CA) is a standard MSI function.

A type-1 CA that saves the values of the required properties in a temporary file. This

CA - executing at...