Uninstalling Files

If you add any files, directories, menus, or registry entries during the installation with your custom classes, then you should update the Uninstaller to delete them. You can also run third party programs during the uninstall. The uninstall commands are different than the uninstall custom classes that you can create. The uninstall commands are actions the uninstaller takes to restore the customer's system to its original state before they installed your app. The uninstall custom classes are extensions of the WizardPanel which typically interact with the user before the uninstall process begins. The discussion is this section is about the uninstall commands.

The uninstaller is one of the last steps the standard JExpress installer takes. You cannot add any uninstall commands until the uninstaller has been created. Therefore, your install custom classes which configure the uninstaller, must be included in the After uninstaller created" field on the Custom | Installer tab.

The CustomUninstaller class lets you easily add commands to restore the end user's system to the way it was before your application was installed. Remember that you must append() or prepend() your commands or the uninstaller won't include them. In general, you do not want to save() your commands because that will remove the standard uninstaller commands.

You will find examples of using the CustomUninstaller API in the Samples subdirectory. The RegisterPanel.java and WinRegistry.java classes contain examples of this API.