lkhoney2003
Level 6

Issue in Search & Replace in console mode

"Search & Replace Strings" works perfectly in GUI mode. But in console based installation same "Search & Replace Strings" is adding a double quote ("") around the new string.

For e.g. [Serach Port 80 & Replace with 9080]

IN GUI :
Before "Search & Replace Strings"
PORT=80
After "Search & Replace Strings"
PORT=9080

IN Console:
Before "Search & Replace Strings"
PORT=80
After "Search & Replace Strings"
PORT="9080"

Please note that extra quotation marks ("") are getting added in console based installation which changed poperty file syntax and application failed to start.

Please let me know if it is a bug of IAW2010.

Thanks in Advance.
Labels (1)
0 Kudos
9 Replies
lkhoney2003
Level 6

Please let me know any workarund.
0 Kudos
lkhoney2003
Level 6

Please reply
0 Kudos
jijujacob27
Level 6

Hi lkhoney2003,

I tried this scenario. The string

PORT=80

changed to

PORT=9080

with IA 2010 in both GUI and console mode.

What is the regular expression that you are using to search & replace?

Thanks,
0 Kudos
lkhoney2003
Level 6

Hello Jacob,

I am using "Modify Text file -Single file" action.

And searching for LISTENER_PORT=45450 and replacing this with LISTENER_PORT=$svReportServerPortVal$.

It works fine in GUI mode but in console it adds an extra quotation mark.

Please help.
0 Kudos
jerome_IA
Level 9

Hello,

Console variables are AFAIK 'always' displayed with double quotes. Same thing for get user input result variables.

Check in your help files regarding variable (VAR_BOOLEAN_X Variable)

For console, you should use $VARIABLE_1$ instead of $VARIABLE$

Basically, your workaround is to use LISTENER_PORT=$svReportServerPortVal_1$ for console mode only.

Hope it will help ...
0 Kudos
lkhoney2003
Level 6

Hello,

We are having a single installer which supports both GUI and console mode.

So in this case there will be 2 modify text file actions:
1) for GUI mode
2) for Console mode

So please also let me know how to detect current installe mode.
I mean how can I know if the installer is running in console mode.
also I am not a very old user of IA 🙂

Thanks
0 Kudos
jerome_IA
Level 9

Hi,

The variable you are looking for is "$INSTALLER_UI$" and can take the values:
SWING, CONSOLE, and SILENT (I do not find related documentation from help files .... so I might be a little wrong, but just try ...)

--Jerome
0 Kudos
lkhoney2003
Level 6

Thanks a lot Jerome...

I will use this variable and will let you know the status 🙂
0 Kudos
pv7721
Level 20

jerome_IA wrote:
Hi,

The variable you are looking for is "$INSTALLER_UI$" and can take the values:
SWING, CONSOLE, and SILENT (I do not find related documentation from help files .... so I might be a little wrong, but just try ...)

--Jerome


I think that the first one is GUI 😄 (like the choices that are given in the Advanced Designer). I prefer to be extra careful in testing the installation mode by setting a variable, say $IS_SILENT$ to true based to the test of $INSTALLER_UI$ being either SILENT or silent...
0 Kudos