Double Backslash problem

Got a problem you cannot solve? Try here.
Post Reply
danj6
Posts: 6
Joined: Tue Sep 16, 2008 9:33 pm

Double Backslash problem

Post by danj6 »

From reading through a few posts, im lead to believe that if a double backslash appears in a variable InstallAware is clever enough to remove one of the backslashes.
I am setting a variable to the following "$TARGETDIR$\\$FOLDER$"
Yet the variable shows "C:\\PATH\\\\FOLDER"
This is a problem as i'm saving this path to a folder.

What am i doing wrong here?
bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Post by bokkie »

If you debug $TARGETDIR$ you'll see it has a trailing backslash. The following statements will show you what you need to do:

Set Variable FOLDER to Fred
MessageBox: FOLDER, $TARGETDIR$$FOLDER$


Italics, my emphasis.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
ulrichard
Posts: 150
Joined: Thu Dec 27, 2007 5:45 am
Location: Switzerland
Contact:

Post by ulrichard »

The command "Extract Path" in the scripting section has an option to "replace \\\\ with \\"

That should fix your problem.

(Too bad we can't use boost::filesystem in msi script ;-)

Rgds
Richard
http://www.pointline.com
http://www.paraeasy.ch
http://ulrichard.ch
Post Reply