Sometimes one is interested to let the user choose where to install the application. It is possible to do using TargetPanel. But sometimes you want to force using specific directory. In this case you must be using DefaultTargetPanel.
In order to use a forced specific directory, you would need to add a
DefaultTargetPanel to your IzPack
<panels> ... <panel classname="DefaultTargetPanel" /> ... </panels>
resources you need to specify a text file where you will store the forced installation location:
<resources> ... <res id="TargetPanel.dir" src="defaultInstallDir.txt" /> ... </resources>
And you need to create than
defaultInstallDir.txt file with a forced location, for example:
As you may see, IzPack lets you to use environmental variables.