This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Variable IA_INSTALL_INSTANCE_NUM is not used in silent mode
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 16, 2016
06:26 PM
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 ?
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) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 02, 2016
05:57 PM
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$
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$
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 21, 2017
09:26 AM
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
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