Installer response file is not complete to use in Silent Install

We are using InstallAnywhere 2012 SP1 Enterprise edition.

We enabled silent install via the checkbox via "Installer UI".
On Linux, we tried to generate the response file by running the installer with the -r option. The variables that were set inside "Console: Custom code" Java code via consoleProxy.setVariable() were missing in the response file.

Q1: What may be the reason?

Q2: We tried to anyway set the values externally, but it didn't seem to work.

Q3: How is custom code handled during silent install

Note: We have Enterprise License for IA 2012.
Labels (1)
0 Kudos
1 Reply

The variables set in custom code are not registered with the "ReplayVariableService".

You need to implement a CustomCodeAction, where the install(InstallerProxy) method calls the ReplayVariableService.
Read the Custom Code reference for other info...

I suggest you keep a map or list of your variable values, to be updated by all your custom code, that way, you call the update variables code just one time, before existing the installer, for example.
A map would allow you to use a different "title" for each variable in the response file

Example: "Port number" is the title:

#Port number

Sample code:

public void install(
final InstallerProxy installerProxy) throws InstallException {
final ReplayVariableService replayService =
(ReplayVariableService) installerProxy.getService(ReplayVariableService.class);
if (null != replayService) {
for (final Entry entry : InstallerUtils.getVariables()) {
replayService.register(entry.getKey(), entry.getValue());

where replayService.register(entry.getKey(), entry.getValue()) = replayService.register("variable value", "variable title");
0 Kudos