|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.denova.JExpress.Installer.CustomUninstaller
public class 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 |
|---|
AdvancedApp, AdvancedEdition, AppDirVariable, AppNameVariable, ArchitectureVariable, AuthorVariable, AutoRunInfFilename, AutoStartupUninstallerFile, BackgroundImageLayout, BasedirPlaceHolder, BasePathArgument, BatchFileExtension, BuildDirArgumentNew, BuildDirArgumentOld, BuilderDirectory, BuilderPackage, BuilderWaitFilename, BuildX32Installer, BuildX64Installer, ClassFileExtension, Classpath, ConfigDirectory, ControlUrlPatchableString, CopyCheqApiJar, CopyCheqDirectory, CopyFileCommand, Copyright, CopyrightSuffix, CreatedFilename, CrossPlatformExecName, CrossPlatformJarVariable, CrossPlatformName, CurrentProjectFilename, CustomClassesCommand, CustomInstallClassesDir, CustomLoaderPrefix, CustomPlatformOptionsFilename, CustomUninstallClassesDir, CustomUninstallDir, CustomUpdateClassesDir, DefaultBackgroundColor, DefaultBrowser, DefaultButtonPosition, DefaultImagePosition, DefaultJpegInstallerImage, DefaultJpegUpdaterImage, DefaultLookAndFeel, DefaultOptionsFilename, DefaultParentAppDir, DefaultProgressBarColor, DefaultProjectFilename, DefaultShowIcons, DefaultShowLaunchDialog, DefaultSynthTheme, DefaultTempDirectory, DefaultTextColor, DefaultUninstallerIcon, DefaultUpdaterIcon, DefaultUseTooltips, DelDirIfEmptyCommand, DelFileCommand, DelManifestCommand, DelPropertyStorageCommand, DelTreeCommand, DownloadUrlFlag, DownloadUrlVariable, EditionEnds, EditionStarts, ExampleProject, ExitIconName, ExitLabel, ExtraParametersFlag, FilesList, GzipFileExtension, GzipListFilename, HtmlFileExtension, InstallerDirectory, InstallerExecVariable, InstallerMainClass, InstallerPackage, InstallersSubdir, InstallerUrlPatchableString, InstallOptionsFilename, JarFileExtension, JarFileSuffix, JavaAppArguments, JavaAppExecutable, JavaAppProgramName, JavaAppPropertiesAltDir, JavaAppPropertiesFilename, JavaAppStandardArguments, JavaAppStartDir, JavaHomeVariable, JexControlPropertiesFilename, JexDataDir, JexDataFilename, JExpressAdvancedApp, JExpressApp, JExpressCopyCheqClassname, JExpressCustomClassName, JExpressInstallerClassName, JExpressJpegLogoFilename, JExpressUninstallerClassName, JExpressUpdaterClassName, JExpressWizardApp, KdePngIconExtension, KdeXpmIconExtension, KeystoreDbFilename, LastTab, LicenseAccountTemplate, LicenseAppRightTemplate, LicenseCheckAppTemplate, LicenseCheckInstallTemplate, LicenseCheckUpdateTemplate, LicenseEmailTemplate, LicenseIDTemplate, LicenseNameTemplate, LicenseOptionsFilename, LicenseProductTemplate, LicenseRightTemplate, LicenseServerFailTemplate, LoaderIsInPackage, LoaderPrefixControl, LocalBuildProperty, LookAndFeelArgument, MacInstallerCommandFilename, MacOsXIconExtension, NativeInstallerLog, NativePropertiesFilename, NativeStartDirFilename, NimbusSubdir, NimRODSubdir, OverwriteFileCommand, PlatformOptionsFilename, PlatformsDirectory, PlatformsParentDir, PlatformVariable, ProgFilesDirVariable, ProjectFileSuffix, ProjectsSubdir, PropertiesFlag, PureJavaDirectory, RawLoaderFilename, RecentJexProjects, RegistrationFilename, RenFileCommand, SearchEverywhereForJvm, SearchIconName, SearchNowhereForJvm, SearchPathForJvm, SelectedNativePlatformsNoJvm, SelectedNativePlatformsWithJvm, SelectedSpecialPlatforms, SilentArgument, SilentFlag, SingleFileGroup, StandaloneDirectory, StandalonePureJavaPrefix, StandardJvmExtraParameters, StandardUserClasspath, SynthSubdir, SystemChangesFilename, TarGzipFileExtension, TellUserHowToStart, TempDirectory, TestDesktopIconPrefix, TestDesktopIcons, TestFlag, ThemesDirectory, TitleCommand, TooManyComputers, TooManyUsers, TrackUninstallCommand, TrialAccount, TrialExpired, TrialLicense, TrialProduct, UninstallerDirectory, UninstallerPackage, UninstallerSubdir, UninstallInstructions, UninstallLinuxServiceCommand, UninstallOptionsFilename, UninstallPathFilename, UninstallWinServiceCommand, UpdateControlPropertiesFilename, UpdateManifestDirectory, UpdateManifestFilename, UpdateMenuPrefix, UpdaterDirectory, UpdaterPackage, UpdateScriptName, UpdatesDirectory, UpdateUrlArgument, UploadDirArgumentNew, UploadDirArgumentOld, UserHomeVariable, UserInstallerDirectory, UserInterface, UserInterfacesFile, UserJExpressDirectory, VersionArgument, VersionEnds, VersionFilename, VersionStarts, VersionVariable, WebDirectory, WebPagesDirectory, WebsiteVariable, WebStartJarVariable, WebStartPlatformName, WebStartWrapperJar, WindowsDirectory, WindowsDirVariable, WindowsIconExtension, WizardApp, WizardEdition, WorkingDirVariable, 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 |
deleteAttribute(java.lang.String keyName,
java.lang.String attribute)
Delete attribute from registry. |
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 |
deleteKey(java.lang.String keyName,
java.lang.String subKeyName)
Delete subKeyName from registry. |
boolean |
deleteManifest(java.lang.String applicationDirectory)
Delete all the files in the manifest. |
boolean |
deletePropertyStorage(java.lang.String productName)
Delete the property storage for this product. |
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 |
removeLinuxService(java.lang.String executable)
Remove a Linux service. |
boolean |
removeWindowsService(java.lang.String serviceName,
java.lang.String executable)
Remove a Windows service. |
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. |
boolean |
tempSave(java.lang.String applicationDirectory,
java.lang.String filename)
Save the commands for the uninstaller command file(s) to a temporary file. |
boolean |
trackUninstall(java.lang.String productName,
java.lang.String website)
Delete the property storage for this product. |
| 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 tempSave(java.lang.String applicationDirectory,
java.lang.String filename)
applicationDirectory - directory where your app is installed.filename - filename for temp file.
public boolean setCustomClasses(java.lang.String classes)
classes - custom classnames, including package name, separated by a space.
public boolean deletePropertyStorage(java.lang.String productName)
productName - name of product.
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 removeWindowsService(java.lang.String serviceName,
java.lang.String executable)
serviceName - is the name used internally by SCMexecutable - is the pathname to the executable
public boolean removeLinuxService(java.lang.String executable)
executable - is the pathname to the executable
public boolean trackUninstall(java.lang.String productName,
java.lang.String website)
productName - name of product.
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 deleteKey(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 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 deleteAttribute(java.lang.String keyName,
java.lang.String attribute)
keyName - the key (e.g., HKEY_LOCAL_MACHINE\\SOFTWARE\\MySoftware).attribute - the value name (e.g., Version).
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.
If you want to run a batch file, then you should create a custom uninstaller class which uses Exec.execCommand() to start the batch file. Then add that custom class to the Custom | Uninstaller tab in the Advanced interface.
exec - program name.args - arguments.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||