Very acute observations Your methods are 100% correct.
Please note that the double slashes are automatically eliminated by all InstallAware scripting functions (including default InstallAware plug-ins).
So an alternate approach would be, if I am guessing correctly, to handle double slashes in your plugins, replacing each instance of \\\\ with \\, and this would make your setup script look cleaner.
However it would still be nice to be able to remove the \\\\ from within IA script (I'm using $TARGETDIR$ in a messagebox that informs the user that his old database was renamed).
Could you add either a new command or an option to the Set Variable command?