[Incident]: Some users report they are unable to access the case portal. Please see this community notice for more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
theone_sumit
Level 4

Installanywhere custom variable not working in silent mode

Hello Team,

We are using IA 2021 version. In our installer, we are using a custom variable which store input from user and write it into a text file. The mechanism is working fine in UI mode but not working in silent mode.

I tried to use 1) properties file and 2) passed the variable in command line with -D parameter.

Both are not working. Also there are no conditions restricting the action from writing the variable in silent mode.

Please suggest on this.

thanks
Sumit

0 Kudos
3 Replies
VineethaNair
Level 6

Hi,

Passing the variable value from command line using -D should work in silent mode.
Please try the below steps :
In InstallAnywhere Designer->Sequence->PreInstall->Add Action->General, add a "Modify text file- Single File" action
Configure the action :
Existing File : Add path of file to be modified
Additional Text : $my_variable$
Select Append or prepend option
[Please refer Variable.png file attached ]
Build the installer
Run the installer from command line in silent mode using the below command:

install.exe -i silent -Dmy_variable=testvalue

The file gets modified with the variable value passed as argument. If the file is getting modified when run in GUI mode, then same should work with silent mode, Unless some action is present which prevents modifying the file or resets the value of the custom variable. If the issue persists, please do attach the log file.
Hope this helps.

0 Kudos
theone_sumit
Level 4

Hello Vineetha,
Thanks for your reply. The steps mentioned in the solution suggested are already implemented in my installer. I have attached the settings in the screenshots. Please check

IA_Issue_1.JPG

IA_Issue_2.JPG

IA_Log.JPG

IA_command.JPG

    

0 Kudos

Hi,

Tried replicating the issue with Modify text file action "configure" settings as well and the value passed with -D is getting properly replaced in silent mode. Issue could not be reproduced in the setup here. Seems like some configuration is different in your setup.

Could you please try creating a new project with the same steps mentioned in my previous comment? Use the installed file option if you want to modify a file the installer deploys on the target system. Could you please create a new project with only the "Modify text File" action with the same configuration in your setup and attach, so that we can help resolve the issue?

0 Kudos