Solved

WinRar SFX  paths with variables

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


 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
Comment Utility
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
Comment Utility
PAQed, with points refunded (140)

CetusMOD
Community Support Moderator
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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. 
Video by: Tony
This video teaches viewers how to export a project from Adobe Premiere Pro and the various file types involved.
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…

763 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

15 Experts available now in Live!

Get 1:1 Help Now