Community Forums
Results 1 to 2 of 2

Thread: Installer response file is not complete to use in Silent Install

  1. #1
    Join Date
    Jan 2015
    Posts
    2

    Question Installer response file is not complete to use in Silent Install

    Hi,
    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.

  2. #2
    Join Date
    Jul 2015
    Posts
    10

    Variables from custom code

    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
    #--------------------
    PORT=1234


    Sample code:

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

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •