UninstallerContext (install4j API)
Description: declaration: package: com.install4j.api.context, interface: UninstallerContext

Package com.install4j.api.context

# Interface UninstallerContext

All Superinterfaces:
  `Context`

public interface UninstallerContext extends Context
The context provided by the uninstaller. In addition to the methods in the `Context` interface, this extended context offers methods that are specific to the uninstaller.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `isUninstallForUpgrade()`
  Returns whether the uninstaller is running as part of an upgrade.

  ### Methods inherited from interface com.install4j.api.context.Context

  `addInstallerEventListener, addToClassPath, cancel, finish, getActionById, getActions, getActions, getAddOnApplicationId, getAllUsersDefaultInstallationDirectory, getApplicationId, getApplicationName, getBooleanVariable, getCompilerVariable, getContentDirectory, getDefaultInstallationDirectory, getDestinationFile, getDestinationFile, getDestinationFileInfo, getExternalFile, getExternalFile, getExtraCommandLineArguments, getFileSetById, getFileSetByName, getFileSets, getFirstAction, getFirstScreen, getId, getId, getInstallationComponentById, getInstallationComponents, getInstallationDirectory, getLanguageId, getLauncherById, getLaunchers, getMediaFileId, getMessage, getMessage, getProgressInterface, getResourceDirectory, getScreenById, getScreens, getScreens, getUserWritableDefaultInstallationDirectory, getVariable, getVariableNames, getVersion, getWizardContext, goBack, goBackInHistory, goBackInHistory, goForward, gotoScreen, gotoScreen, handleCriticalException, hasBeenElevated, initializeLazilyCreatedScreens, isArchive, isCancelling, isConsole, isErrorOccurred, isGui, isRebootRequired, isUnattended, registerHiddenVariable, registerResponseFileComment, registerResponseFileVariable, removeInstallerEventListener, runElevated, runScript, runUnelevated, runWithSuspendedActions, setErrorOccurred, setVariable, triggerReboot, unregisterResponseFileVariable`

- ## Method Details

  - ### isUninstallForUpgrade

    boolean isUninstallForUpgrade()
    Returns whether the uninstaller is running as part of an upgrade. This method returns `true` when the uninstaller is run by the "Uninstall previous installation" of another installer performing an upgrade into the same directory.
    Returns:
      `true` or `false`.