Archive: Get double backslashes in path


Get double backslashes in path
We are going to have the installer make a .reg file and then the user can run the reg script once and then have all the settings to impot later.
The problem I ran into is:
The paths need to have double backslashes \\ in order to import.
I tried the INI writing functions in NSIS but none worked for this.
What's the easiest way to get a string with double \\ from $INSTDIR ?


Use StrRep:
http://nsis.sourceforge.net/StrReplace

You can't use this on $INSTDIR though as NSIS will always validate the contents of the variable when its value is changed. You should StrCpy $R0 $INSTDIR and then modify $R0.

-Stu