by Njål

Install4j: Installing to the home directory of user


Install4j is a great installer that wraps Java application into a native installer package & launcher (executable). It can embed JRE, so you won’t have to worry about user that don’t have Java installed.

When releasing our application I wanted to offer our customers two installers:

  1. One standard installer which installs the application to the home directory of the user. This application auto updates itself. No admin privileges required.

  2. One Terminal Server version which installs the program for all users. Admin privileges are needed to install, and auto updates are disabled since normal users can’t update the application anyways.

(This is the way Chrome and a lot of other great apps do it)

Making a Terminal Server installer was very easy. Just enable “For All Users” and set “Elevation”.

Here’s how you make the installer install into a users home directory by default:

context.setInstallationDirectory(new File(System.getProperty("user.home") + "/ArgusClient"));





The installer now suggests your home folder:image