Solved

WinRar SFX  paths with variables

Posted on 2004-09-02
4
3,490 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Today companies are subjected to more-and-more data, and it won't stop any time soon.  But there are obvious opportunities for reducing data, particularly data duplicated among companies.
A high-level exploration of how our ever-increasing access to information has changed the way we do our jobs.
Viewers will learn how to use the Hootsuite Dashboard.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

932 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now