Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make the install4j updater remove files?

Tags:

install4j

Our install4j-based app has a 3rd party library jar called (eg) foobar-1.0.jar

In an updated version, we have replaced the jar with foobar-1.1.jar

The install4j updater adds the new jar, but doesn't remove the old one. So now both are on the classpath. This is making our app crash.

How can I tell the updater to remove a file that no longer should be there?

like image 280
Steve McLeod Avatar asked Sep 08 '14 16:09

Steve McLeod


2 Answers

You can add an "Uninstall previous installation" action to your "Installation" screen.

If there are some files that you do not want to delete during such an update, go to the "Files" step, edit an entry, switch to the "Installation options" step of the wizard and set the "Uninstall policy" to one of the "... but not for update" options.

like image 76
Ingo Kegel Avatar answered Nov 04 '22 06:11

Ingo Kegel


Install4j Installer Screens and Actions

Here is a screenshot of where and how to add the uninstaller.

like image 1
bhlowe Avatar answered Nov 04 '22 05:11

bhlowe