Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

7-zip sfx extract to this folder

- - - - -

  • Please log in to reply
25 replies to this topic

#1
SoreGums

SoreGums

    Newbie

  • Member
  • 31 posts
  • Joined 18-February 04
How do you just create a 7-zip sfx that extracts to a specified directory/place automatically without prompts?

Example.
Portable FireFox, doesn't need to be installed, just needs to be somewhere... I setup a stripped out version of PFF and 7-zip'd it up again (sfx) but when you execute pff.exe it asks where to extract to.
How do I get it to just extract to "c:\" ?

Thanks


How to remove advertisement from MSFN

#2
ajua

ajua

    Custom Installer Maker

  • Member
  • PipPipPipPipPipPip
  • 1,261 posts
  • Joined 16-April 05
have you tried looking in the 7-zip docs/help/online guides if there is a set commands you can run to achieve what you want?

Custom Installers for your unattended needs.


#3
vim

vim

    Junior

  • MSFN Sponsor
  • 53 posts
  • Joined 23-May 06

How do you just create a 7-zip sfx that extracts to a specified directory/place automatically without prompts?

Example.
Portable FireFox, doesn't need to be installed, just needs to be somewhere... I setup a stripped out version of PFF and 7-zip'd it up again (sfx) but when you execute pff.exe it asks where to extract to.
How do I get it to just extract to "c:\" ?

Thanks

I want to know something very similar. There are examples galore regarding Swithless installs, but what I want to do is use SFX to extract to a dir of choice and then execute a file in that directory, nothing else. I don't want to install anything except the compressed archive. Uncompress the archive to a folder - execute a file in the folder - end of story. Somehow this is not possible, but I know it is. I have a program that does it, just can't find info on how to pass the paramerter to execute the one file. This program uncompresses to a 7z.temp folder and then executes the file.

There's pleny of advice about passing arguments at the command level but nothing using the windows Parameters: of 7zip.

#4
Martin H

Martin H

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 802 posts
  • Joined 24-November 06
  • OS:none specified
@SoreGums

1. Download 7ZSD.sfx from it's homepage :
http://7zsfx.solta.ru/en/

2. Copy/paste the following into notepad and save it using 'UTF8' as 'config.txt' :
;!@Install@!UTF-8!
InstallPath="%Programfiles%\\Portable Firefox"
GUIMode="2"
;!@InstallEnd@!
(Change the path as you like, and remember to use double backslashes)

3. Make a 7z archive of the contents inside your 'Portable Firefox' folder.

4. Place the 7z archive, 7ZSD.sfx and config.txt into the same folder and copy/paste the following into a command prompt :
copy /b 7ZSD.sfx + config.txt + archive.7z Setup.exe
(Change 'Setup.exe' to whatever you want)

@vim

Use the above directions + additionally add the following to 'config.txt':
RunProgram="hidcon:setup.cmd"
Change 'setup.cmd' to whatever. If you don't run a batch file, then remove the 'hidcon:' part(it's used to hide the console window). You can run 'msi' files directly without using 'msistub.exe' or 'msiexec.exe' with this modified 7z SFX installer module(7ZSD.sfx). Btw, if you don't want a fixed extraction path and just want to use the temp folder, and also have the folder with the extracted files deleted afterwards, then remove the following from 'config.txt' :
InstallPath="x"

Edited by Martin H, 26 July 2007 - 03:43 PM.

/* Moved to Linux - Thanks for a nice stay all! */
Posted Image


#5
SoreGums

SoreGums

    Newbie

  • Member
  • 31 posts
  • Joined 18-February 04

;!@Install@!UTF-8!
InstallPath="%Programfiles%\\Portable Firefox"
GUIMode="2"
;!@InstallEnd@!

Nice one thanks :)
I knew it was something to do with the config.txt
Is there a list of parameters anywhere, they are hard to find...

Thanks again :)

#6
SoreGums

SoreGums

    Newbie

  • Member
  • 31 posts
  • Joined 18-February 04

have you tried looking in the 7-zip docs/help/online guides if there is a set commands you can run to achieve what you want?

Well in the help file I have with 7-zip here it lists parameters for config.txt but doesn't mention "InstallPath"
So if it did I'd have been good to go...

#7
Martin H

Martin H

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 802 posts
  • Joined 24-November 06
  • OS:none specified
@SoreGums

I am reffering to(and have linked to) the modified version of that module, which includes several knew features...

You can find descriptions of all parameters on the modified modules homepage :
http://7zsfx.solta.ru/en/

Edited by Martin H, 26 July 2007 - 03:44 PM.

/* Moved to Linux - Thanks for a nice stay all! */
Posted Image


#8
vim

vim

    Junior

  • MSFN Sponsor
  • 53 posts
  • Joined 23-May 06

1. Download 7ZSD.sfx from the first link listed on this russian page :
http://7zsfx.solta.ru/downloads_RU.html
2. Copy/paste the following into notepad and save it using 'UTF8' as 'config.txt' :
;!@Install@!UTF-8!
InstallPath="%Programfiles%\\Portable Firefox"
GUIMode="2"
;!@InstallEnd@!
(Change the path as you like, and remember to use double backslashes)
3. Make a 7z archive of the contents inside your 'Portable Firefox' folder.
4. Place the 7z archive, 7ZSD.sfx and config.txt into the same folder and copy/paste the following into a command prompt :copy /b 7ZSD.sfx + config.txt + archive.7z Setup.exe
(Change 'Setup.exe' to whatever you want) 
Use the above directions + additionally add the following to 'config.txt':
RunProgram="hidcon:setup.cmd"
Change 'setup.cmd' to whatever. If you don't run a batch file, then remove the 'hidcon:' part(it's used to hide the console window). You can run 'msi' files directly without using 'msistub.exe' or 'msiexec.exe' with this modified 7z SFX installer module(7ZSD.sfx). Btw, if you don't want a fixed extraction path and just want to use the temp folder, and also have the folder with the extracted files deleted afterwards, then remove the following from 'config.txt' :
InstallPath="x"


@Martin H, Thank you, just what I was looking for. I noticed that your Russian link *.sfx is much smaller than the one given by the guide on 7zip installers. I though my immediate install would have been different. I noticed several people modifing the *.sfx using Reshack. I have looked inside. Someone modified the % expanding to be just % and then below their was a word saying Loading in the gray area. Are theri any tuts on the dialouge modifing?

Thanks again for your help. Interestingly you helped two people with one "stone" :)

EDIT: I first googled and for some reason the above "babelfish" site never came up. Great find.
I also was wondering about the "config.txt" parameters...now if I can just figure out how to use
Reshack on the SFX file I'll be set.

Edited by vim, 21 June 2007 - 10:55 AM.


#9
Martin H

Martin H

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 802 posts
  • Joined 24-November 06
  • OS:none specified
Hi again, vim :) (And btw, you are very welcome, mate!)

The moded module i linked to is smaller because it is made for only decompressing LZMA(default 7z archiving algorithm). There are also three other versions of the module on the site for other algorithms. Another reason is that it's the 7ZSD.sfx version, instead of the frequently other used 7zS.sfx version of the module. The difference between the two is that the 7ZSD.sfx version is dynamically linked to MSVCRT.dll, whereas 7zS.sfx is statically linked to it, and so since all newer Windows OSes includes MSVCRT.dll by default in their OS, then there's no reason to use the version of the module which wasts additional space on statically linking to that lib also(unless you want to support legacy OS's also). The moded module has now abandoned the 7zS.sfx version and now only supports the 7ZSD.sfx version. This module isn't UPX'd, because you can't change the icon on a SFX installer made with a UPX'd module, but you can just UPX the module after you have changed the icon, if you care about saving about half of the modules uncompressed size. I'm not sure what it is you're trying to archive with your reshacking question, so i can't answer specifically, however this moded module itself allready includes several parameters for changing the text, fonts, buttons, logos and extraction dialogs etc. For example, you can reshack the normal module to e.g. completely hide the extraction dialog, but with this moded module, then you just add the parameter :
GUIMode="2"
. On the site i linked to earlier, then there is also another section which shows various examples and pictures of how it looks during the installation and then also lists the needed code for 'config.txt' to archieve that result. If what you are after isn't allready covered by the new feature set of the moded module, then i'm affraid that i can't help you, since i don't personally have any other experience with reshacking exe's other than the simple process of changing icons on my selfmade 7z switchless installers.

CU, Martin.

/* Moved to Linux - Thanks for a nice stay all! */
Posted Image


#10
SoreGums

SoreGums

    Newbie

  • Member
  • 31 posts
  • Joined 18-February 04
Awesome info there and yeah I picked up on the fact that it wasn't the same sfx module used around the place and have made my auto extract pff file and works great on w2k/xp/vista (chose to extract to %appdata% since vista has all the new permissions stuff).

I changed the icon and made the dialog show with a short message, works great.

Thanks again.

edit: after checking out more parameters there is a neat shortcut creation line too which is really good!

Edited by SoreGums, 22 June 2007 - 01:32 AM.


#11
Martin H

Martin H

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 802 posts
  • Joined 24-November 06
  • OS:none specified
@SoreGums

You are very welcome, mate :) Yeah, i'm also really impressed with all the new great parameters that is available now with this version of the module, and indeed, the shortcut creation parameter is indeed simply brilliant :) Other things which i like the most, is the 'hidcon:' switch for the 'RunProgram=' parameter, so the console window is completely hidden during batch file loading and the ability to run MSI installers directly, without needing msistub.exe or msiexec.exe.

CU, Martin.

/* Moved to Linux - Thanks for a nice stay all! */
Posted Image


#12
bledd

bledd

    msfn is a friend of mine!

  • MSFN Sponsor
  • 1,733 posts
  • Joined 24-March 04
this program may help you

http://freeweb.siol....ads/EasySFX.zip

:)

#13
vim

vim

    Junior

  • MSFN Sponsor
  • 53 posts
  • Joined 23-May 06

this program may help you
http://freeweb.siol....ads/EasySFX.zip

Thanks. It looks like an interesting program. The only problem is, I can't see where I can execute a file that resides inside the *.7z archive like I can using "config.txt". It has to reside OUTSIDE the archive.

#14
bledd

bledd

    msfn is a friend of mine!

  • MSFN Sponsor
  • 1,733 posts
  • Joined 24-March 04
that can create an exe installer compressed with 7zip

#15
asphyxia

asphyxia

    Newbie

  • Member
  • 16 posts
  • Joined 23-February 07
What is the switch for 7-zip through which i can install 7-zip silently but with progress bar shown.

#16
vim

vim

    Junior

  • MSFN Sponsor
  • 53 posts
  • Joined 23-May 06

that can create an exe installer compressed with 7zip

True but not what I stated. EasySFX.exe need the EXE to be ouside the archive, like so:

+INSTALLER.7z.
+----setup.exe
+----setup.dat
+----data.cab

Martin H's method has the EXE, that's going to be exectued, inside the archive using "config.txt"

#17
coucou

coucou

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 837 posts
  • Joined 01-January 04
Hi Martin H,

I used yr method... everything goes just fine.
In fact, i appreciate the 7zsD.sfx method instead of 7zs.sfx because, no more msiexec/msistub are needed.

Neverless, by using 7zs.sfx dialog as here bellow, I had a decompression Progress_Bar display.
500 DIALOG 0, 0, 186, 26
STYLE DS_FIXEDSYS | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION
CAPTION "Progress"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
FONT 8, "MS Shell Dlg"
{
   CONTROL "Progress1", 1000, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 7, 7, 172, 14 
}

Is there any how to get that decompression Progress_Bar display with the 7zsD.sfx?

TNX for yr help
coucou

Edited by coucou, 01 July 2007 - 02:40 PM.


#18
coucou

coucou

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 837 posts
  • Joined 01-January 04
Hi all,

Finally i found my wish thanks to here above Martin's link http://babelfish.alt...../Frame01.html.
My solution was not modifying 7zsd.sfx, simply add/modify config.txt file like here bellow
;!@Install@!UTF-8!
ExtractTitle="Program vx.xx build xxx Extraction..."
GUIMode="1"
RunProgram="program.exe /switch or program.msi /switch"
;!@InstallEnd@!

coucou

#19
Martin H

Martin H

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 802 posts
  • Joined 24-November 06
  • OS:none specified
Hi coucou :)

I'm sorry that i didn't catch your post before now, but i can see that you have found it out by yourself anyway, so that's good to hear :)

CU, Martin.

/* Moved to Linux - Thanks for a nice stay all! */
Posted Image


#20
coucou

coucou

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 837 posts
  • Joined 01-January 04
Hi Martin,

Is anywhere a real english version of http://7zsfx.solta.ru/ (NOT the babelfish translated version)?

I've downloaded them 7zSD CHM, unfortunately (regarding myself), it's in russian too. Is anywhere to get an enlish version of it?

Regards
coucou

#21
Martin H

Martin H

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 802 posts
  • Joined 24-November 06
  • OS:none specified
Sorry - Atleast not any that i'm aware off...

/* Moved to Linux - Thanks for a nice stay all! */
Posted Image


#22
Oleg_Sch

Oleg_Sch

    Newbie

  • Member
  • 34 posts
  • Joined 09-July 07
Hi!
First of all... Sorry for my bad english, my primary language is russian...
I'm the author of this modified 7-zip SFX module.
And I'll try to answer your questions
English documentation (and site) is almost ready and (i hope) you will see it in next one or two weeks.
It has been made by professional translators from "translators club oszone.net" (thanks to Vadikan)
I think, this will be more useful that babelfish.

While I can try to answer your questions in this topic.
Or ask me via e-mail (you will see it on main page on http://7zsfx.solta.ru)

Edited by Oleg_Sch, 10 July 2007 - 12:03 AM.


#23
0d14r3

0d14r3

    Member

  • Member
  • PipPip
  • 195 posts
  • Joined 12-September 06
Wecome, Oleg_Sch.
I apreciate and use your tools frequently.

Thanks.

0d

#24
coucou

coucou

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 837 posts
  • Joined 01-January 04
Warm Wecome, Oleg_Sch.

Well, now we know who's behind this maginficent tool and happy to know that an official English documentation/site will be ready very soon.

Regards
coucou

#25
Oleg_Sch

Oleg_Sch

    Newbie

  • Member
  • 34 posts
  • Joined 09-July 07
Hi All!
I'm create a new thread here http://www.msfn.org/...howtopic=101552, where you can find an english documentation :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users