Solved

WinRar SFX  paths with variables

Posted on 2004-09-02
4
3,517 Views
Last Modified: 2012-05-05
I want the SFX RAR to extact files to to a subdirectory on the desktop so I set "path to extract" to


%HOMEDRIVE%\%HOMEPATH%\desktop\_stuff

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

%HOMEDRIVE%\%HOMEPATH%\desktop\_stuff


--

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:

http://img75.exs.cx/img75/4918/winrarerrorsfx.png


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?


thanks
0
Comment
Question by:paradoxloss
  • 2
4 Comments
 

Author Comment

by:paradoxloss
ID: 11961429


 update:  I changed both paths to

%HOMEDRIVE%%HOMEPATH%\desktop\_stuff

(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....

0
 

Author Comment

by:paradoxloss
ID: 11961534
And the answer is:

Set the second path to

"%HOMEDRIVE%"%HOMEPATH%\desktop\_stuff



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

0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 12170791
PAQed, with points refunded (140)

CetusMOD
Community Support Moderator
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
Let’s list some of the technologies that enable smooth teleworking. 
Using Adobe Premiere Pro, the viewer will learn how to set up a sequence with proper settings, importing pictures, rendering, and exporting the finished product.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question