Page 1 of 1

Backslash removal

Posted: Tue Mar 01, 2011 12:06 am
by semaphore_au
I note in the forums:
If you are concerned about the double backslash, InstallAware automatically eliminates double backslashes in all path related functions before the function call executes.
.

Is the writing of a string value to the registry considered a "path related function"? I am writing the string "sql:\\server\database" to the registry from a variable and it replaces the double backslashes with a single backslash. Interestingly, if in the "Write Registry Key" command I replace the variable with a string constant, it does not do the backslash replacement!!

How do I stop this replacement from happening? (Using IA9)

Re: Backslash removal

Posted: Tue Mar 01, 2011 11:57 am
by giaviv
Interesting. As a work-around, try writing three backslashes.

Re: Backslash removal

Posted: Wed May 11, 2011 10:08 pm
by semaphore_au
We are about to do a new release and this is still a problem. Inserting three backslashes does not work. However, based on the information in the article http://www.installaware.com/forum/viewt ... w=previous, seven backslashes will be replaced with 2 backslashes!

I've done some digging (in case any one else has this issue) and, apart from the first 2 backslashes, it takes 4 backslashes to produce a single backslash in the output.

So the question to technical support is: given the dodgy hack of 7 backslashes produces 2 was created in 2006, and is still operational, can I rely on this to continue to work in future releases? Will this be formally documented somewhere? Are you looking at adding a flag that determines whether backslash reduction is used or not?

Cheers

Re: Backslash removal

Posted: Thu May 12, 2011 3:08 am
by giaviv
Dear semaphore_au,

Don't worry - we will make sure to keep everything backward compatible in this regard!