Solved

WinRar SFX  paths with variables

Posted on 2004-09-02
4
3,563 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Backup Data/Portable NAS storage 4 95
Chrome: How to show the Bookmarks bar? 4 58
CPU at 100% usage, why? 27 157
Event log and black screen 22 69
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…
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
The viewer will learn how to create multiple layers to apply various filters and how to delete areas from each layer’s filter.
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.

726 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