|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.denova.JExpress.Installer.CustomUninstaller
Add commands to the uninstaller to remove files and directories that your custom installer classes or your app adds that you want removed when your app is deleted.
| Field Summary |
| Fields inherited from interface com.denova.JExpress.JExpressConstants |
AdvancedEdition, AppDirVariable, AppNameVariable, AutoRunInfFilename, BasedirPlaceHolder, BasePathArgument, BatchFileExtension, BuildDirArgumentNew, BuildDirArgumentOld, BuildPackage, ClassFileExtension, Classpath, ConfigDirectory, ControlUrlPatchableString, CopyFileCommand, Copyright, CopyrightSuffix, CreatedFilename, CrossPlatformExecName, CrossPlatformName, CurrentProjectFilename, CustomClassesCommand, CustomInstallClassesDir, CustomLoaderPrefix, CustomLookAndFeel, CustomUninstallClassesDir, CustomUninstallDir, CustomUpdateClassesDir, DefaultBrowser, DefaultJpegInstallerImage, DefaultJpegUpdaterImage, DefaultLookAndFeel, DefaultOptionsFilename, DefaultProjectFilename, DefaultTempDirectory, DefaultThemePack, DefaultUninstallerIcon, DefaultUpdaterIcon, DefaultUseTooltips, DelDirIfEmptyCommand, DelFileCommand, DelManifestCommand, DelTreeCommand, EditionEnds, EditionStarts, ExampleProject, ExitIconName, ExitLabel, ExtraParametersFlag, FilesList, GzipFileExtension, GzipListFilename, HtmlFileExtension, InstallerDirectory, InstallerMainClass, InstallerPackage, InstallersSubdir, InstallerUrlPatchableString, InstallOptionsFilename, JarFileExtension, JarFileSuffix, JavaAppArguments, JavaAppExecutable, JavaAppProgramName, JavaAppPropertiesAltDir, JavaAppPropertiesFilename, JavaAppStandardArguments, JavaAppStartDir, JavaDirectory, JavaHomeVariable, JExpressAdvancedApp, JExpressApp, JExpressCustomClassName, JExpressInstallerClassName, JExpressJpegLogoFilename, JExpressUninstallerClassName, JExpressUpdaterClassName, JExpressWizardApp, KdePngIconExtension, KdeXpmIconExtension, KeystoreDbFilename, LoaderDirectory, LoaderIsInPackage, LoaderPackage, LoaderPrefixControl, LocalBuildProperty, MacInstallerCommandFilename, MacOsXIconExtension, MetalLookAndFeel, ModernThemePack, NativeInstallerLog, NativeLookAndFeel, NativePropertiesFilename, NativeStartDirFilename, OverwriteFileCommand, PlatformOptionsFilename, PlatformsDirectory, PlatformsParentDir, PlatformVariable, ProgFilesDirVariable, ProjectFileSuffix, ProjectsSubdir, PropertiesFlag, RawLoaderFilename, RecentJexProjects, RegistrationFilename, RenFileCommand, SearchEverywhereForJvm, SearchIconName, SearchNowhereForJvm, SearchPathForJvm, SelectedNativePlatformsNoJvm, SelectedNativePlatformsWithJvm, SilentInstallFlag, SingleFileGroup, SkinLFPackage, SkinPLAF, StandaloneDirectory, StandalonePureJavaPrefix, StandardJvmExtraParameters, StandardUserClasspath, StartWinAppFilename, SystemChangesFilename, TellUserHowToStart, TempDirectory, ThemePackArgument, ThemePackFilename, TitleCommand, UninstallerDirectory, UninstallerPackage, UninstallerSubdir, UninstallInstructions, UpdateManifestDirectory, UpdateManifestFilename, UpdateMenuPrefix, UpdaterDirectory, UpdaterPackage, UpdateScriptName, UpdatesDirectory, UserHomeVariable, UserInstallerDirectory, UserInterface, UserJExpressDirectory, UserUpdatePropertiesFilename, VersionArgument, VersionFilename, VersionVariable, WebDirectory, WebPagesDirectory, WindowsDirectory, WindowsDirVariable, WindowsIconExtension, WizardEdition, ZipFileExtension, ZipSkipPatchableString |
| Constructor Summary | |
CustomUninstaller()
CustomUninstaller lets you customize the uninstaller for your app. |
|
| Method Summary | |
boolean |
addSubkeyEntry(java.lang.String keyName,
java.lang.String subKeyName,
java.lang.String subKeyData)
Adds the subKeyName and its data to the registry if and only if it doesn't already exist. |
boolean |
append(java.lang.String applicationDirectory)
Append the commands to the uninstaller command file(s). |
boolean |
copyFileCommand(java.lang.String fromFilename,
java.lang.String toFilename)
Copy file, if the toFilename does not already exist. |
boolean |
deleteDirIfEmpty(java.lang.String directoryName)
Delete the directory if it's empty. |
boolean |
deleteDirTree(java.lang.String directoryName)
Delete all the files in directory tree, including the directoryName |
boolean |
deleteFile(java.lang.String filename)
Delete the file. |
boolean |
deleteManifest(java.lang.String applicationDirectory)
Delete all the files in the manifest. |
boolean |
deleteSubkeyEntry(java.lang.String keyName,
java.lang.String subKeyName)
Delete subKeyName from registry. |
boolean |
deleteWindowsDesktopIcon(java.lang.String submenu,
java.lang.String itemName,
java.lang.String user)
Delete icon from the desktop on Windows. |
boolean |
deleteWindowsMenuItem(java.lang.String submenu,
java.lang.String itemName,
java.lang.String user)
Delete menu item from Start | Programs on Windows. |
boolean |
overwriteFileCommand(java.lang.String fromFilename,
java.lang.String toFilename)
Copy the fromFilename to the toFilename, even if the toFilename existed. |
boolean |
prepend(java.lang.String applicationDirectory)
Add the commands to the beginning of the uninstaller command file(s). |
boolean |
renameFile(java.lang.String fromFilename,
java.lang.String toFilename)
Rename file, if the toFilename does not already exist. |
boolean |
replaceDataEntry(java.lang.String keyName,
java.lang.String subKeyName,
java.lang.String subKeyData)
Replaces the data for the subKeyName. |
boolean |
runThirdPartyApp(java.lang.String exec,
java.lang.String[] args)
Run a third party program. |
boolean |
save(java.lang.String applicationDirectory,
java.lang.String productName)
Save the commands for the uninstaller command file(s). |
boolean |
setCustomClasses(java.lang.String classes)
Set the custom classes to run before uninstalling. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CustomUninstaller()
| Method Detail |
public boolean append(java.lang.String applicationDirectory)
applicationDirectory - directory where your app is installed.
public boolean prepend(java.lang.String applicationDirectory)
applicationDirectory - directory where your app is installed.
public boolean save(java.lang.String applicationDirectory,
java.lang.String productName)
applicationDirectory - directory where your app is installed.productName - name of product to be uninstalled.
public boolean setCustomClasses(java.lang.String classes)
classes - custom classnames, including package name, separated by a space.
public boolean deleteManifest(java.lang.String applicationDirectory)
applicationDirectory - directory where your app is installed.
public boolean deleteDirTree(java.lang.String directoryName)
directoryName - name of the directory to start deleting files.
public boolean deleteDirIfEmpty(java.lang.String directoryName)
directoryName - name of the directory, including full path, to delete.
public boolean deleteFile(java.lang.String filename)
filename - name of file, including full path, to delete.
public boolean renameFile(java.lang.String fromFilename,
java.lang.String toFilename)
fromFilename - the original name of the file, including full path.toFilename - the new name of the file, including full path.
public boolean copyFileCommand(java.lang.String fromFilename,
java.lang.String toFilename)
fromFilename - the original name of the file, including full path.toFilename - the new name of the file, including full path.
public boolean overwriteFileCommand(java.lang.String fromFilename,
java.lang.String toFilename)
fromFilename - the original name of the file, including full path.toFilename - the new name of the file, including full path.
public boolean addSubkeyEntry(java.lang.String keyName,
java.lang.String subKeyName,
java.lang.String subKeyData)
keyName - the key (e.g., HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows).subKeyName - the last element of the key.subKeyData - the string data, if any, for the subKeyName.
public boolean replaceDataEntry(java.lang.String keyName,
java.lang.String subKeyName,
java.lang.String subKeyData)
keyName - the key (e.g., HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows).subKeyName - the last element of the key.subKeyData - the string data, if any, for the subKeyName.
public boolean deleteSubkeyEntry(java.lang.String keyName,
java.lang.String subKeyName)
keyName - the key (e.g., HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows).subKeyName - the last element of the key.
public boolean deleteWindowsMenuItem(java.lang.String submenu,
java.lang.String itemName,
java.lang.String user)
submenu - the submenu.itemName - the menu item.user - if currentUser, then delete menu from the HKEY_CURRENT_USER key; if allUsers, then try to delete from the
HKEY_LOCAL_MACHINE key, but if that fails, then delete from the HKEY_CURRENT_USER key.
public boolean deleteWindowsDesktopIcon(java.lang.String submenu,
java.lang.String itemName,
java.lang.String user)
submenu - the submenu.itemName - the menu item.user - if currentUser, then delete menu from the HKEY_CURRENT_USER key; if allUsers, then try to delete from the
HKEY_LOCAL_MACHINE key, but if that fails, then delete from the HKEY_CURRENT_USER key.
public boolean runThirdPartyApp(java.lang.String exec,
java.lang.String[] args)
It's very important that you *not* pass the full command line, including arguments, as the first parameter. Also, the uninstaller can only run apps that have a fully qualified pathname for the exec and the args listed individually in a String[]. In other words, the first parameter must be the pathname for the program (e.g., C:\Program files\Java\bin\java.exe).
If the third party app is a part of the files that the installer installed, then be sure to call prepend() so your app is run before the standard part of the uninstaller runs.
exec - program name.args - arguments.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||