• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
keytotime

How to make a 7-Zip Switchless Installer

288 posts in this topic

I don't know if anyone noticed, but the config.txt also has an other syntax:

ID_String="Value"

Title: Title for messages

BeginPrompt: Begin Prompt message

Progress: Value can be "yes" or "no". Default value is "yes".

RunProgram: Command for executing. Default value is "setup.exe".

Substring %%T will be replaced with path to temporary

folder, where files were extracted

Directory: Directory prefix for "RunProgram". Default value is "..\\"

ExecuteFile: Name of file for executing

ExecuteParameters: Parameters for "ExecuteFile"

You can omit any values.

Example:

;!@Install@!UTF-8!
Title="7-Zip 4.42"
BeginPrompt="Do you want to install 7-Zip 4.42?"
ExecuteFile="msiexec.exe"
ExecuteParameters="/i 7zip.msi REINSTALL=ALL REINSTALLMODE=vomus"
;!@InstallEnd@!

Edited by Glowy
0

Share this post


Link to post
Share on other sites

wow ok so I thought msietub.exe or startX wasn't needed and tried this:

;!@Install@!UTF-8!
Title="Shockwave"
Progress="no"
ExecuteFile="msiexec.exe"
ExecuteParameters="/i shockwave.msi /qn"
;!@InstallEnd@!

did the copy command and tested: after extracting it says cannot find Setup.exe.

And I don't think it will work since it will try to find msiexec.exe in the 7z extracted folder..

Edited by ZileXa
0

Share this post


Link to post
Share on other sites

that's true..

I bluntly copy pasted it. :blushing:

it works, just not for msiexec

0

Share this post


Link to post
Share on other sites
BUT 7z SFX modules are unable to launch .cmd files (only .exe),

Funny but all my sfx installers launch a .cmd from config.txt without the help from an .exe.

;!@Install@!UTF-8!

RunProgram="install.cmd"

;!@InstallEnd@!

maybe I have a special computer that allows it?

;-)

0

Share this post


Link to post
Share on other sites
maybe I have a special computer that allows it?

;-)

maybe i had a special version of 7-zip that disallow it... more that one month ago... there were some updates...

OMG, i feeded the troll :rolleyes:

0

Share this post


Link to post
Share on other sites

WOW! :w00t: The just released 7-zip version 4.42 (non beta) allow a new syntax:

;!@Install@!UTF-8!
Title="7-Zip 4.01 Update"
BeginPrompt="Do you want to install the 7-Zip 4.01 Update?"
ExecuteFile="msiexec.exe"
ExecuteParameters="/i 7zip.msi REINSTALL=ALL REINSTALLMODE=vomus"
;!@InstallEnd@!

End of StartX/msistub reign?

0

Share this post


Link to post
Share on other sites

already posted 5 posts ago. and no, it does not mean the end of StartX/MsiStub (also already posted)

0

Share this post


Link to post
Share on other sites

@Glowy, I read back, there is only something about msiexec not working, but you don't even need it.

This works just fine:

;!@Install@!UTF-8!
Title="Software app v1.0"
BeginPrompt="Do you want to install the Software app v1.0?"
ExecuteFile="browser.msi"
ExecuteParameters="/qb"
;!@InstallEnd@!

Ofcourse it works just fine without ExecuteParameters, and you don't need the BeginPrompt.

So why still use msistub?

Same goes for StartX. Simply use ExecuteFile and you don't need it anymore.

QUESTION:

It must be possible to create a 7z file that extracts to a specified folder? Nothing more.

It can be done with Winzip and winrar, very easy. But I haven't figured out how to do this with 7z.

the method in this topic first extracts everything to temp folder. then I could make a batchfile copying it to the right folder but that's double work..

Any ideas?

(especially with big archives the double work is annoying AND this method is meant for Installers so I know it is normal that it is done this way)

Edited by ZileXa
0

Share this post


Link to post
Share on other sites

To extract to a specified folder, you'll need 7zCon.sfx (console version, no config.txt). It offer these options :

7-Zip SFX 4.32  Copyright (c) 1999-2005 Igor Pavlov  2005-12-09

Usage: 7zSFX [<command>] [<switches>...]

<Commands>
l: List contents of archive
t: Test integrity of archive
x: eXtract files with full pathname (default)
<Switches>
-o{Directory}: set Output directory
-p{Password}: set Password
-y: assume Yes on all queries

You can reproduce "winzip sfx overwrite" mode with :

my-7zcon-sfx.exe -oC:\MyDir -y

++

0

Share this post


Link to post
Share on other sites

I use a modified 7zip sfx module to specify an extraction path.

Get it here Usage instructions are in german (oops) russian and english.

shark

Edited by Shark007
0

Share this post


Link to post
Share on other sites

Shark007, a suggestion, contact the 7zip developers! They should replace the 7zS.exe with your build! Thanks a lot for your work. This is absolutely the best user-made thing here on msfn!

0

Share this post


Link to post
Share on other sites
Shark007, a suggestion, contact the 7zip developers! They should replace the 7zS.exe with your build! Thanks a lot for your work. This is absolutely the best user-made thing here on msfn!
I didnt say i made it, i said i use it.

shark

0

Share this post


Link to post
Share on other sites

oops :D

I want to run an INF file, the command to run the inf works when I try it in command prompt... doesn't work with the modified 7z sfx:

;!@Install@!UTF-8!
RunProgram="rundll32.exe advpack.dll,LaunchINFSection %programfiles%\DVD-ReBuilder\SHORTCUTS.INF,DefaultInstall"
InstallPath="%PROGRAMFILES%"
ExtractTitle="Easy Installer: Extracting..."
GUIMode="2"
;!@InstallEnd@!

(ofcourse the RunProgram parameter is 1 line, after LaunchINFSection there is only a space).

I am getting an error that says System cannot find given file.

posted this question also in the modded 7zS.sfx Russian forum :D

EDIT:

And I got an answer! Check this out:

;!@Install@!UTF-8!
ExtractTitle="Easy Installer: Extracting..."
InstallPath="%PROGRAMFILES%"
RunProgram="hidcon:install.cmd"
GUIMode="2"
;!@InstallEnd@!

All files will get extracted to the Program Files folder, then the file install.cmd is run, hiding the console window!

Guimode=2 will hide the 7zip extraction window completely.

EDIT:

Oleg_Sch modified 7z SFX module has A LOT of possibilities I think no English user knows about! My DVD-ReBuilder Easy Installer now uses it to create shortcuts (no matter what Windows language you use, for ALL users, WinRAR can't even do this! does it for current user only), view a dialog, even view an optional dialog so that the user can give extraction path! It can run a file or run a different file/command when silent switch is given.

And a lot of customisation options.

There will be an English translation from the Russian documentation.

Edited by ZileXa
0

Share this post


Link to post
Share on other sites

Just a quick question,

If you include the msi redistributions (instmsia.exe and instmsiw.exe) in your archive and execute your silent install on a 9x OS:

A. Will the relevant redistribution get installed silently if required prior to installation taking place.

and

B. If it is installed will it screw with the rest of the installation.

I know this was brought up earlier on in the post but it wasn't really answered.

Thanks.

0

Share this post


Link to post
Share on other sites

I tried to follow the instructions and make a switchless installer for adobe reader 6 and got an error message "cannot find setup.exe"

I later tried extracting the files from the adobe installer and got the file called setup.exe but now the install sequence does not complete ... the extraction works but then everything just stops and no installation actually occurs.

I have tried with other programs as well but again received the error message "cannot find setup.exe" and was also unable to extract the install files from those programs installers ...

any ideas ??

0

Share this post


Link to post
Share on other sites

I know some of you have been having a few issues getting InstallShield apps to work. For what it's worth, here are a couple tricks I have figured out that are working for me:

* try it with and without the dash(-) in front of the f1 or f2 in the config.txt file (ex. setup.exe -s f1setup.iss)

* try both the .iss file and the .log file, I have found some apps need one of them, some need the other (ex. setup.exe -s f1setup.iss OR setup.exe -s f2setup.log)

* if you can't get it to work at all, use a batch file to run it. The trick here that took me awhile to figure out was you have to put the batch file in your app folder PRIOR to using 7z to archive. I know that is obvious for some of you, but being somewhat new to this, I didn't pick that up right away. So in other words, use this:

config.txt file

;!@Install@!UTF-8!
RunProgram="start.cmd"
;!@InstallEnd@!

start.cmd

start /wait setup.exe -s -f1setup.iss
exit

* if nothing else works, and your app seems to run but then nothing happens, I figured out a little work around. I ended up having to use this for 3DMark family, because for some reason it wouldn't find setup.iss in the same folder with setup.exe, it wanted to be told where to find it, so:

config.txt

;!@Install@!UTF-8!
RunProgram="start.cmd"
;!@InstallEnd@!

start.cmd

xcopy setup.* %systemdrive%\ /Y /Q
start /wait 3DMark.exe -s -f1"%systemdrive%\setup.iss"
del %systemdrive%\setup.iss /Q
del %systemdrive%\setup.log /Q
exit

I hope this helps...

0

Share this post


Link to post
Share on other sites

Hello! anybody know how to transfer the % complete in 7zS.sfx on the left side instead from the right.... :)

ds22

0

Share this post


Link to post
Share on other sites

Could the topicstarter update his first post? Some images are missing, step 9 doesn't clearly state we are making a new text file and where does the .msi go and where do the other files go? It seems as if all the files go in the archive and a 2nd copy of the .msi is also placed outside the archive...?

0

Share this post


Link to post
Share on other sites

this might sound stupid but where can i find 7sf.sfx file or how do i create it will someone please explain

0

Share this post


Link to post
Share on other sites
this might sound stupid but where can i find 7sf.sfx file or how do i create it will someone please explain

From 7.zip site I presume.

If you open the help file under 7zip it is very clearly explained how to create auto installation sfx files. Also provides links for downloads.

0

Share this post


Link to post
Share on other sites

How to run multiple commands (runprogram) inside txt file ??

thx

Edited by hfrfc
0

Share this post


Link to post
Share on other sites
How to run multiple commands (runprogram) inside txt file ?? thx

Put the multiple commands into a batchfile and have the installer execute that instead.

shark

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.