initInstall

initInstall

Initializes the installation of the specified software and version.

Method of

Install object

Syntax

int initInstall (
   String displayName,
   String package,
   InstallVersion version,
   int flags);
int initInstall (
   String displayName,
   String package,
   String version,
   int flags);
int initInstall (
   String displayName,
   String package,
   String version);
int initInstall (
   String displayName,
   String package,
   InstallVersion version);

Parameters

The initInstall method has the following parameters:

displayName
A string that contains the name of the software being installed. The name of the software is displayed to the user.
package
The Client Version Registry pathname for the software (for example: Plugins/Adobe/Acrobat or /royalairways/RoyalPI/).
It is an error to supply a null or empty name.
The name can be absolute or relative. A relative pathname is relative to the Netscape 6 namespace. A relative pathname must start with plugins/, to be relative to the plug-ins portion of that namespace or java/download/, to be relative to the Java portion. All other parts of the Netscape 6 area of the registry are reserved for use by Netscape.
The Client Version Registry is a hierarchical description of the software registered for use with Netscape 6. The registry name provided here is not the location of the software on the machine, it is the location of information about the software inside the registry. This distinction is important when you add components with the addFile method.
version
An InstallVersion object or a String representing the version of the package being installed. When version is a String it should be up to four integer values delimited by periods, such as "1.17.1999.1517".
flags
An optional field; reserved for future use. Pass 0 as the default value.

Returns

An integer error code. For a list of possible values, see Return Codes.

Description

The initInstall method initializes the installation of the specified software. You must call this method immediately after the constructor. It is an error to call any other Install methods before calling initInstall. After calling initInstall, your script must call performInstall or cancelInstall before it finishes. If your script does not call performInstall or cancelInstall, Netscape 6 will not be able to clean up properly after your script finishes.

Example

To start installation for the Royal Airways plug-in, you could use this code:

initInstall("Royal Airways TripPlanner","/RoyalAirways/
TripPlanner","1.0.0.0");
...
err = getLastError();
if (!err)
   performInstall();
else
   cancelInstall(err);

Document Tags and Contributors

 Last updated by: Sheppy,