Community Forums
Results 1 to 3 of 3

Thread: Variable IA_INSTALL_INSTANCE_NUM is not used in silent mode

  1. #1
    Join Date
    Jul 2015
    Posts
    13

    Variable IA_INSTALL_INSTANCE_NUM is not used in silent mode

    Hi;

    I have a variable INSTANCE_ID, which is set by the standard IA variable IA_INSTALL_INSTANCE_NUM. Later... the value of INSTANCE_ID is used in some files to create a unique name for the Windows service and linux daemon. This works well in UI or console mode.

    I don't know where IA_INSTALL_INSTANCE_NUM gets it value. As I understand, IA keeps a counter of existing instances using this variable. The value is incremented at each installation. So the first instance installed has IA_INSTALL_INSTANCE_NUM = 1, and the second instance of the same application being installed on the same server will have IA_INSTALL_INSTANCE_NUM = 2... etc...

    The user running the installer never has to confirm this IA_INSTALL_INSTANCE_NUM, it is read only anyways.

    In silent mode, it looks like the auto-increment is reset to 1. The Nth instance, if installed silently (using a response file where the install path is modified, of course), always has IA_INSTALL_INSTANCE_NUM = 1
    So the Windows service that was already installed with IA_INSTALL_INSTANCE_NUM = 1 is now overidden by the latest instance.

    I understand that IA_INSTALL_INSTANCE_NUM is not written in the response file. It should not be, because it would be the value of the original installation. But since IA_INSTALL_INSTANCE_NUM is auto-incremented and set automatically, I would have expected it to keep counting, even in silent mode.

    Using my variable INSTANCE_ID with the -D option in command line does not help either :

    installer.exe -i silent -f install.properties -D$INSTANCE_ID$=4

    It still overrides the instance that was installed with id= 1, so the original Windows service is useless.

    Any clues ?

  2. #2
    Join Date
    Jul 2015
    Posts
    13

    Unhappy IA_INSTALL_INSTANCE_NUM in silent mode

    To answer my own question...

    I had to introduce a question to the user to confirm some "unique id" for the instance of the product being installed. The default value is $IA_INSTALL_INSTANCE_NUM$

    Example:
    "Please confirm a unique id for this installation" (Default = $IA_INSTALL_INSTANCE_NUM$ ) :
    User input sets $INSTANCE_ID$

    Now that the installer expects input at variable $INSTANCE_ID$, it can be used in silent mode : -i silent -D$INSTANCE_ID$=2

    But, obviously, this is just a workaround. The silent mode does not use $IA_INSTALL_INSTANCE_NUM$

  3. #3
    Join Date
    Jul 2015
    Posts
    13

    A better workaround

    I found a better workaround that does not require adding a panel or console.

    At the start of the pre-install sequence, add a "Set variable" action INSTANCE_ID = INSTALL_INSTANCE_NUM, with rule to check if INSTANCE_ID is null. Only set variable if INSTANCE_ID is null. It will not be null if silent installation is used with option -DINSTANCE_ID

    So the user of the UI or console installer is never asked for "a unique id for this installation". But the user of the silent installer, if used on the same server where an instance is already installed, must provide -i silent -DINSTANCE_ID=2

Tags for this Thread

Posting Permissions

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