Jump to content

How to make a 7-Zip Switchless Installer


keytotime

Recommended Posts

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?

Link to comment
Share on other sites


  • 2 weeks later...

@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
Link to comment
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

++

Link to comment
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!

Link to comment
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

Link to comment
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
Link to comment
Share on other sites

  • 2 months later...

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.

Link to comment
Share on other sites

  • 3 weeks later...

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 ??

Link to comment
Share on other sites

  • 1 month later...

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...

Link to comment
Share on other sites

  • 2 months later...

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...?

Link to comment
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.
×
×
  • Create New...