WinRar SFX paths with variables

I want the SFX RAR to extact files to to a subdirectory on the desktop so I set "path to extract" to


I want to show the user the newly extracted files after completion so I set "run after extraction" to



The files are extracted to the directory on the user's desktop as expected, but the self extracting rar gives this error when launching explorer to the above path:

text:  Windows cannot find 'C:\\Documents'.  Make sure you type the name correctly, and then try again.  To search for a file, click the Start button, and then click Search.

Why the double-backslash in the second case only??

Ideas on how to make this work?  without explicitly stating the path since it needs to work for multiple different users?

Who is Participating?
CetusMODConnect With a Mentor Commented:
PAQed, with points refunded (140)

Community Support Moderator
paradoxlossAuthor Commented:

 update:  I changed both paths to


(notice no backslash between the double %%)

While WinRAR SFX continues to extact the files to the subdirectory on any given user desktop, the run after extraction gives almost the same error -- this time not two backslashes, but only one.

Windows cannot find 'C:\Documents'.  Make sure....

paradoxlossAuthor Commented:
And the answer is:

Set the second path to


I'll leave this open in case there's a better way ;)

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.