MSFN Forum: winrar sfx comment.txt through batch file - MSFN Forum

Jump to content


Unattended CD/DVD Guide Homepage · MSFN Forum Rules

Welcome to the Applications Installs forum. Make sure you read the forum rules before you start posting.

Links/Requests to warez and/or any illegal material (porn, cracks, serials, etc..) will not be tolerated. Discussion of circumventing WGA/activation/timebombs/keygens or any other illegal activity will also not be tolerated.

We try our best to keep this forum clean of illegal content. If you see any illegal activity use the "report" button you find in every post to report the specific post to the moderators. If you ignore any of the rules you will be banned without notice.

Read Forum Rules
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

winrar sfx comment.txt through batch file entering system variable from batch to text file Rate Topic: -----

#1 User is offline   darksimoon 

  • Member
  • PipPip
  • Group: Members
  • Posts: 111
  • Joined: 29-May 05

  Posted 05 September 2012 - 06:43 AM

hello friends;
i am preparing winrar sfx file as portable application through batch file.
and i enter the options of the sfx file by comment.txt
but when i enter "TempMode" into the comment.txt by batch file,
somehow it doesn't extract the files into the temp file. Instead it extracts
the files into the current folder. I don't understand why.
below is my batch.cmd and comment.txt content;
how can i make the sfx file to extract the content into the temp folder ?

=========batch file=========
echo TempMode >> .\comment.txt
============================

=====comment.txt===========
;Created By Alberto
setup=FSCapture.exe
TempMode
Silent=2
Overwrite=1
===========================


As an alternative to this problem i decided to use "path=%temp%" instead of "TempMode".
but this time batch file converts "path=%temp%" to "path=C:\Users\alberto\AppData\Local\Temp"
in the comment.txt

=========batch file=========
echo path=%temp% >> .\comment.txt
============================

=======comment.txt=========
;Created By Alberto
setup=FSCapture.exe
path=C:\Users\myuser\AppData\Local\Temp
Silent=2
Overwrite=1
===========================
how can i make the batch file to write "path=%temp%" in to the comment.txt ?

That is to say, how can i solve TempMode issue at sfx file or path=%temp% issue at batch file ?
please help me about them.
best regards....


#2 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,433
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 05 September 2012 - 07:17 AM

Open a command prompt.
Try issuing in it:
@echo %temp%


@echo ^%temp^%


jaclaz

#3 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,363
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 05 September 2012 - 11:09 AM

The usual method of escaping percent characters in batch files is by doubling them up!
>OUTFILE.EXT ECHO=%%TEMP%%


#4 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,433
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 05 September 2012 - 11:33 AM

View PostYzöwl, on 05 September 2012 - 11:09 AM, said:

The usual method of escaping percent characters in batch files is by doubling them up!
>OUTFILE.EXT ECHO=%%TEMP%%


Yes :thumbup
It is different between command line and batch, my bad :blushing: .

jaclaz

#5 User is offline   submix8c 

  • Inconceivable!
  • Group: Patrons
  • Posts: 3,244
  • Joined: 14-September 05
  • OS:none specified
  • Country: Country Flag

Posted 05 September 2012 - 11:33 AM

What OS are you running this on?

What version of WinRar? (see Version History / OS supported)

Winrar v4 Help

This post has been edited by submix8c: 05 September 2012 - 11:35 AM


#6 User is offline   darksimoon 

  • Member
  • PipPip
  • Group: Members
  • Posts: 111
  • Joined: 29-May 05

Posted 05 September 2012 - 11:43 PM

dear Jaclaz; thank you very much for your help
dear Yzöwl; i did as you say and it worked out. :) thanks a lot.
and dear submix8c; i use both win xp and win 7. i also use the latest version of winrar. however there is no such a thing in the help file.
so i think best way is set the path=%temp%.

once again, thank you very much friends.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy