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

FileGrep and FileInsertFile - adding an unwanted backslash character

Hi,

I have a non ini file in which I have to replace some parameters. For this I use Filegrep and FileInsertFIle.

`filename = m_strJBossDepl ^ "\\conf\\VM.properties";   a = "RETRIEVE_VIDEO_SERVER="^m_strRetrVS;FileGrep ( filename, "RETRIEVE_VIDEO_SERVER=", svReturnLine, nvLineNumber, RESTART ); FileInsertLine (filename, a, nvLineNumber, REPLACE); `

Initial VM.properties file
RETRIEVE_VIDEO_SERVER=http://70.97.166.114:8080/VMWebApp

m_strRetrVS="http://10.10.10.1:8080/VMWebApp"

After
RETRIEVE_VIDEO_SERVER=\http://10.10.10.1:8080/VMWebApp

That backslash before equal character is inserted. The m_strRetrVS variable contain only the good string "http://10.10.10.1:8080/VMWebApp".

Any ideas ?
Thanks,
Bianca
Labels (1)
• InstallShield 2008

2 Replies
Flexera Alumni
The ^ operator (used in your definition of a) assumes you're concatenating parts of a path, inserting backslashes between the pieces if there isn't already one. Perhaps use + instead?
Level 4
RobertDickau wrote:
The ^ operator (used in your definition of a) assumes you're concatenating parts of a path, inserting backslashes between the pieces if there isn't already one. Perhaps use + instead?

Thank you 🙂

Bianca