Backslash removal

Got a problem you cannot solve? Try here.
Post Reply
semaphore_au
Posts: 3
Joined: Tue Jun 08, 2010 6:55 am

Backslash removal

Post 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)
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Backslash removal

Post by giaviv »

Interesting. As a work-around, try writing three backslashes.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
semaphore_au
Posts: 3
Joined: Tue Jun 08, 2010 6:55 am

Re: Backslash removal

Post 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
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Backslash removal

Post by giaviv »

Dear semaphore_au,

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

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply