install4j API documentation


com.install4j.api
Interface Context

All Known Subinterfaces:
InstallerContext, InstallerWizardContext

public interface Context

The basic installation and uninstallation context. This is the base class of all context classes that are provided to your custom actions and screens. To uninstallation actions, an object of this class is passed. Installation actions and custom screens receive context objects with extended information and interaction facilities (please see the derived classes).

Author:
ej-technologies GmbH

Method Summary
 java.lang.String getAddOnApplicationId()
          Returns the add on application id.
 java.lang.String getApplicationId()
          Returns the application id.
 java.io.File getInstallationDirectory()
          Retrieves the installation directory selected by the user, or the default installation directory if the user has not yet made a selection.
 java.lang.String getUserVariableValue(java.lang.String variableName)
          Gets the value of a user variable as it was defined for this media file at the compile time.
 boolean isAdminUser()
          Checks whether the current user has administration privileges.
 boolean isUnattended()
          Returns whether the installer or uninstaller is running unattended or if it displays a graphical wizard.
 void rebootAfterFinish()
          Microsoft Windows only: if your custom code makes changes that requires a reboot after the wizard has finished, you can invoke this method.
 

Method Detail

getInstallationDirectory

java.io.File getInstallationDirectory()
Retrieves the installation directory selected by the user, or the default installation directory if the user has not yet made a selection.

Returns:
the installation directory

isAdminUser

boolean isAdminUser()
Checks whether the current user has administration privileges.

Returns:
true if the user is admin

getUserVariableValue

java.lang.String getUserVariableValue(java.lang.String variableName)
Gets the value of a user variable as it was defined for this media file at the compile time. User variables are defined on the "User variables" tab in the "General Settings" section and can be overridden for each media file.

Parameters:
variableName -
Returns:
the value or null if the variable with the specified name was not defined.

rebootAfterFinish

void rebootAfterFinish()
Microsoft Windows only: if your custom code makes changes that requires a reboot after the wizard has finished, you can invoke this method.


isUnattended

boolean isUnattended()
Returns whether the installer or uninstaller is running unattended or if it displays a graphical wizard.

Returns:
true if it is running unattended

getApplicationId

java.lang.String getApplicationId()
Returns the application id.

Returns:
the application id

getAddOnApplicationId

java.lang.String getAddOnApplicationId()
Returns the add on application id.

Returns:
the add on application id