Initializes the installation of the specified software and version.
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);
initInstall method has the following parameters:
stringthat contains the name of the software being installed. The name of the software is displayed to the user.
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
An InstallVersion object or a
Stringrepresenting the version of the package being installed. When
Stringit should be up to four integer values delimited by periods, such as "1.17.1999.1517".
- An optional field; reserved for future use. Pass 0 as the default value.
An integer error code. For a list of possible values, see Return Codes.
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
cancelInstall, Netscape 6 will not be able to clean up properly after your script finishes.
To start installation for the Royal Airways plug-in, you could use this code:
initInstall("Royal Airways TripPlanner","/RoyalAirways/ TripPlanner","18.104.22.168"); ... err = getLastError(); if (!err) performInstall(); else cancelInstall(err);