MSFN Forum: How to make a 7-Zip Switchless Installer - 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
  • 15 Pages +
  • « First
  • 10
  • 11
  • 12
  • 13
  • 14
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

How to make a 7-Zip Switchless Installer Rate Topic: ***** 3 Votes

#221 User is offline   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 8,322
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 12 April 2008 - 02:26 AM

You have your config file named config.TEXT!!! You need it to read config.txt...

Also you don't put the main files into a folder and the 7z that folder you just 7z all of the files like example2

Then you will be left with 3 files like in example 1

This post has been edited by Kelsenellenelvian: 12 April 2008 - 02:35 AM



#222 User is offline   cool400 

  • Junior
  • Pip
  • Group: Members
  • Posts: 72
  • Joined: 08-November 05

  Posted 19 April 2008 - 06:16 AM

Hi,

this is a really cool thread - but all the information blew my mind away :blink:

I've got some questions that are nearly unsolvable for me as a noob, but maybe not for you guys :whistle:

1) I want to add files and the regarding subfolders to a 7z-archive, that are themselves contained in the subfolder "av8" - but without including this folder-prefix in the archive, meaning I want the archived files and folders to be in the root of the archive. This is my command:

7z a -t7z av8.7z -mx=9 av8\

How can I achieve that the files and subfolders are in the archive-root?

2) I want to make a silent(!) SFX-archive from this 7z-archive. ATM I'm doing this with WinRAR and the SFX-command

Path=%windir%\Temp\Avira
SavePath
Setup=hide.exe "%windir%\Temp\Avira\setup.cmd"
Silent=1
Overwrite=1

so that all files are unextracted to %windir%\Temp\Avira and after that the setup.cmd is called! This is my command:

copy /b 7zS.sfx + config.txt + av8.7z Avira_Antivir_8_Free_Silent.exe

and this is the config.txt:

;!@Install@!UTF-8!
RunProgram="hide.exe ""setup.cmd"""
;!@InstallEnd@!

Note that the command hide.exe needs the parameter "setup.cmd" in quotes (hide.exe is an AutoIt-file that hides the CMD-window).

Do you know what I'm doing wrong?

Best regards and thanks a lot in advance!!!

cool400 :ph34r:

#223 User is offline   ricktendo 

  • Group: Banned Members
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,228
  • Joined: 06-June 06
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 19 April 2008 - 09:36 AM

cool400 use the new 7zip method its much better, you can use multipple RunPrograms and it also has a built in hide CMD window

Here is an example on how to install a program and then copy the updated files after its installed
;!@Install@!UTF-8!
RunProgram="ir32_257_26021.exe /S"
RunProgram="hidcon:cmd /c tskill Ir"
RunProgram="hidcon:cmd /c copy /v /y Irremote.ini %WinDir%"
GUIMode="2"
;!@InstallEnd@!


Here is my 7-zip (the program) I reshack the icons after install to have a Vista look ;)
;!@Install@!UTF-8!
RunProgram="7z457.exe /S"
RunProgram="ResHacker -addoverwrite \"%ProgramFiles%\\7-Zip\\7z.dll\", \"%ProgramFiles%\\7-Zip\\7z.dll\", \"%%T\\7z.dll.res\",,,"
GUIMode="2"
;!@InstallEnd@!


You can do tons of new things, here is a updated tutorial

Also look at this help file, it has tons of examples on how to Reg Add, XCopy, Reg Del and lots of other things

http://7zsfx.solta.ru/en/examples.html

This post has been edited by ricktendo64: 19 April 2008 - 09:39 AM


#224 User is offline   Martin H 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 802
  • Joined: 24-November 06
  • OS:none specified

Posted 19 April 2008 - 03:01 PM

View Postcool400, on Apr 19 2008, 02:16 PM, said:

1) I want to add files and the regarding subfolders to a 7z-archive, that are themselves contained in the subfolder "av8" - but without including this folder-prefix in the archive, meaning I want the archived files and folders to be in the root of the archive. This is my command:

7z a -t7z av8.7z -mx=9 av8\

How can I achieve that the files and subfolders are in the archive-root?

First, i would just like to say that ricktendo64's advice about switching to Oleg Sch's modded 7z SFX module is very, very good advice indeed :thumbup

Second, then to answer your actual question, then you need to add the full path and a '*' to get 7-Zip to exclude the folder and only compress the files. 7-Zip's command-line interface is alittle different than standard Win32 CMD syntax, so '*.*' for 7-Zip, only reffers to files with an extension, whereas '*' is any file with and without an extension. Lastly, then the parameter '-t7z' is redundant, as it is the default used format. So, to recap, the complete command-line would be :
7z a -mx=9 av8.7z <path>\av8\*


#225 User is offline   cool400 

  • Junior
  • Pip
  • Group: Members
  • Posts: 72
  • Joined: 08-November 05

  Posted 19 April 2008 - 04:30 PM

Thanks to both of you for your help!!! I really appreciate this :wub:

As I'm really willing to find things out myself I hate it to ask such questions - but I think I'm stuck again :no:

I followed Rick's advice and read tons of information about the modified 7-Zip SFX-module. I think I made a big step into the right direction, but it seems I'm missing something!

First I found out that the 7za.exe is not able to unzip EXE-files, especially the Avira Antivir Setup-EXE :huh: 7z.exe is able to do this - but what is the difference between these both files? I think I read the the 7za.exe contains the librarys and 7z.exe not - do I need any further files when using the 7z.exe? Are there any disadvantages?

I slightly modified the create.cmd this way:

cd av8
..\7z a -mx=9 "..\av8.7z" *
cd ..
copy /b 7zsd.sfx + config.txt + av8.7z Avira_Antivir_8_Free_Silent.exe
del av8.7z

Then I built a config.txt:

;!@Install@!UTF-8!
InstallPath="C:\\Windows\\Temp\\Avira"
RunProgram="basic\\setup.exe /inf=\"setup.inf\""
RunProgram="hidcon:cmd /c tskill avscan"
GUIMode="2"
;!@InstallEnd@!

The folder-structure looks like this:

[root]
7z.exe
7zsd.sfx
config.txt
-- [av8]
	{files}
	.
	.
	.
	setup.inf
	-- [basic]
		{files}
		.
		.
		.
		setup.exe

When I open the Avira_Antivir_8_Free_Silent.exe first it seems that all went well, but when I take a look into the Antivir-logfile it say that the setup.inf has errors :blink:
This is really strange, because with exactly the same setup.inf it's no problem when using the WinRAR-SFX-methode!

This is my WinRAR-SFX-comment:

;Der folgende Kommentar enthält SFX-Skriptbefehle

Path=%windir%\Temp\Avira
SavePath
Setup=hide.exe "%windir%\Temp\Avira\setup.cmd"
Silent=1
Overwrite=1

After extracing the WinRAR-SFX to C:\Windows\Temp\Avira I call this command in the setup.cmd:

start /wait %windir%\Temp\Avira\basic\setup.exe /inf="%windir%\Temp\Avira\setup.inf"

...and it works - like I said with exactly the same INF-file!

Do you know what I did wrong with the 7-Zip-SFX-method that it not works like the WinRAR does?

Further I had a batch-file that automatically replaced the SFX-icon with a custom one:

reshacker.exe -addoverwrite Avira_Antivir_8_Free_Silent.exe, Avira_Antivir_8_Free_Silent.exe, av8.ico, icongroup,101,1033

But it seems that this destroys my SFX-file! Do you know why? I tried to manually replace the icon, but maybe I need another icon-file (format?).

Best regards and thanks a lot!

cool400 :ph34r:

#226 User is offline   Martin H 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 802
  • Joined: 24-November 06
  • OS:none specified

Posted 19 April 2008 - 05:18 PM

You're most welcome, mate :)

However, i'm affraid i cannot really be of any help with your next problem, unfortunetly - except if the error message you saw where about not being able to find the inf file altogether, which then would be because you haven't entered the path to the inf in the 7z-sfx, as opposed to the RAR-sfx...

About your other question, then 7z.exe is 7-Zip's command-line version and it's dynamically linked(externally) to the libs in the 7-Zip distribution, whereas 7za.exe is the stand-alone version, which has the libs statically linked(internally), and is restricted to only support 7z, zip, gzip, bzip2, Z and tar.

Lastly, then just a little tip... When working with the 7z installer sfx module, then the archive is always unpacked into %temp%, except if defined otherwise, so you would actually then only need the two 'RunProgram' parameters and could ditch the 'InstallPath' one...

This post has been edited by Martin H: 19 April 2008 - 05:23 PM


#227 User is offline   ricktendo 

  • Group: Banned Members
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,228
  • Joined: 06-June 06
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 19 April 2008 - 05:46 PM

Your SFX editing is not working because of 1033... Change it to zero "0"

Posted Image

EDIT: Try this config.txt

;!@Install@!UTF-8!
InstallPath="%WinDir%\\Temp\\Avira"
RunProgram="%%T\\basic\\setup.exe /inf=setup.inf"
RunProgram="hidcon:cmd /c tskill avscan"
GUIMode="2"
;!@InstallEnd@!


or this

;!@Install@!UTF-8!
InstallPath="%WinDir%\\Temp\\Avira"
RunProgram="%%T\\basic\\setup.exe /inf=\"%%T\\basic\\setup.inf\""
RunProgram="hidcon:cmd /c tskill avscan"
GUIMode="2"
;!@InstallEnd@!


Quote

%%S - full path to the SFX archive file
%%T - full extraction path

This post has been edited by ricktendo64: 19 April 2008 - 05:55 PM


#228 User is offline   LeveL 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 551
  • Joined: 30-September 05

Posted 19 April 2008 - 05:53 PM

All that hacking with ResHacker confuses me, why not make the silent installer with WinRAR? Please don't say "why are you asking that in a 7z topic" :rolleyes: Just seems simpler with WinRAR, you only need the comment and pack a QBFC exe with it to do the business. You can even pack in 7za.exe and do it that way with a 7z archive inside the WinRAR SFX archive. :angel

This post has been edited by LeveL: 19 April 2008 - 05:55 PM


#229 User is offline   Martin H 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 802
  • Joined: 24-November 06
  • OS:none specified

Posted 19 April 2008 - 06:05 PM

Well, for starters because 7-Zip is free, much more advanced(with the moded module) and features better compression...

Personally, then i never change the icons away from the defaults, as the icons for me is totally irellavant, but to each there own, of course :)

#230 User is offline   MAVERICKS CHOICE 

  • The Guy from Aus
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,693
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

  Posted 19 April 2008 - 06:14 PM

View PostLeveL, on Apr 20 2008, 09:53 AM, said:

All that hacking with ResHacker confuses me, why not make the silent installer with WinRAR? Please don't say "why are you asking that in a 7z topic" :rolleyes: Just seems simpler with WinRAR, you only need the comment and pack a QBFC exe with it to do the business. You can even pack in 7za.exe and do it that way with a 7z archive inside the WinRAR SFX archive. :angel


Winrar is nice but not free, not a terrible difference with compressions though. Just remember the more compression can sometimes mean greater installation time. Gotta weigh the difference & the speed of the machine your installing on.

#231 User is offline   Inferi0r 

  • Little dude
  • PipPip
  • Group: Members
  • Posts: 180
  • Joined: 28-July 06

Posted 20 April 2008 - 03:42 AM

And also with 7-Zip you can retrieve the config.txt for a nice installer you come across. Same as the comments in the WinRAR SFX. Just use the 7z SFX Archive Splitter for fast learning about 7zip SFX mods.

#232 User is offline   rafi2391 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 30-December 07

Posted 22 April 2008 - 03:03 PM

i dont understant what i need to write insted this:
–switch

i try to make switchless to icq6 but i didnt success

This post has been edited by rafi2391: 22 April 2008 - 03:57 PM


#233 User is offline   ricktendo 

  • Group: Banned Members
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,228
  • Joined: 06-June 06
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 22 April 2008 - 09:30 PM

View Postrafi2391, on Apr 22 2008, 04:03 PM, said:

i dont understant what i need to write insted this:
–switch

i try to make switchless to icq6 but i didnt success
Try CMenu or SendToA3X

Right click on the installer an choose "Identify Installer"

This post has been edited by ricktendo64: 22 April 2008 - 09:31 PM


#234 User is offline   rafi2391 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 30-December 07

Posted 23 April 2008 - 07:22 AM

the software doesn't work for all the software
i didn'd success to create switchless file

who can help me?

#235 User is offline   ricktendo 

  • Group: Banned Members
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,228
  • Joined: 06-June 06
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 23 April 2008 - 09:16 AM

View Postrafi2391, on Apr 23 2008, 08:22 AM, said:

the software doesn't work for all the software
i didn'd success to create switchless file

who can help me?
Sometimes just running the installer with the /? switch will give you a pop up of switches, other times just looking at the installer icon and trying other known switches like /S or /SILENT & /VERYSILENT can yield you a switch

This post has been edited by ricktendo64: 23 April 2008 - 09:17 AM


#236 User is offline   rafi2391 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 30-December 07

Posted 23 April 2008 - 12:29 PM

i try all your option but i didnt success again
in addition i try you 2 software that you gave me before and i didnt success for 3 software that i need

waht i need to do?

#237 User is offline   Martin H 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 802
  • Joined: 24-November 06
  • OS:none specified

Posted 23 April 2008 - 07:40 PM

Search MSFN/google for :

<programname> silent install

If there isn't a silent switch provided in the used installer, then either write an AutoIT script, or simply capture all the added files, folders and reg-entries(with e.g. Regshot unicode) and then make a batch/reg-file.

#238 User is offline   rafi2391 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 30-December 07

Posted 24 April 2008 - 08:56 AM

it is no help me
i want to make switchless install for icq6.who can help me with "-switch"?

#239 User is offline   cool400 

  • Junior
  • Pip
  • Group: Members
  • Posts: 72
  • Joined: 08-November 05

  Posted 24 April 2008 - 12:30 PM

View Postrafi2391, on Apr 24 2008, 04:56 PM, said:

it is no help me
i want to make switchless install for icq6.who can help me with "-switch"?

Let me remind you the topic of this thread: "How to make a 7-Zip Switchless Installer" - it's not "What are the silent-switches for ICQ6?" :whistle:

I did a (really short and fast) search via Google and found out, that you have two options: using AutoIt (I've got a script for the german version of ICQ, you only have to make it compatible to your own language) or simply use an SFX-archive!

This is the (german) AutoIt-script made by Monchi from the german-nlite.de forum:

run ("Install_ICQ6.exe")
WinWait ("ICQ6 - InstallShield Wizard", "Welcome to ICQ")
ControlCommand("ICQ6 - InstallShield Wizard","Welcome to ICQ", "Button1", "Check")
ControlCommand("ICQ6 - InstallShield Wizard","Welcome to ICQ", "Button17", "UnCheck")
ControlClick("ICQ6 - InstallShield Wizard","Welcome to ICQ", "Button2")
WinWait ("ICQ6 - InstallShield Wizard", "Custom Installation")
ControlClick("ICQ6 - InstallShield Wizard","Custom Installation", "Button9")
ControlCommand("ICQ6 - InstallShield Wizard","Custom Installation", "Button15", "UnCheck")
ControlCommand("ICQ6 - InstallShield Wizard","Custom Installation", "Button16", "UnCheck")
ControlCommand("ICQ6 - InstallShield Wizard","Custom Installation", "Button18", "UnCheck")
ControlClick("ICQ6 - InstallShield Wizard","Custom Installation", "Button2")
WinWait ("ICQ6 - InstallShield Wizard", "Bevor Du loslegst")
ControlClick("ICQ6 - InstallShield Wizard","Bevor Du loslegst", "Button2")
WinWait ("ICQ6 - InstallShield Wizard", "You successfully installed ICQ 6")
ControlCommand("ICQ6 - InstallShield Wizard"," You successfully installed ICQ 6", "Button27", "UnCheck")
ControlCommand("ICQ6 - InstallShield Wizard"," You successfully installed ICQ 6", "Button28", "UnCheck")
ControlCommand("ICQ6 - InstallShield Wizard"," You successfully installed ICQ 6", "Button29", "UnCheck")
ControlClick("ICQ6 - InstallShield Wizard"," You successfully installed ICQ 6", "Button2")
RegDelete("HKCU\Software\Microsoft\Windows\CurrentVersion\Run", "ICQ")

And here you can download a ready-to-go SFX-file, that installs ICQ6 unattended to %programfiles%\ICQ6 and creates a shortcut on the desktop: http://www.file-uplo...8/ICQ6.exe.html. The ICQ-datas are saved in "User\Application Data\ICQ"!

It shows a progress-screen when extracting - if you want it to install completely silent, simply change the method in the SFX-comment.

Anyway, you have to learn something about wether AutoIt or WinRAR-SFX-archives ;)

Best regards

cool400 :ph34r:

#240 User is offline   rafi2391 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 30-December 07

Posted 24 April 2008 - 12:49 PM

COOL400
thank you very very very much i love you!!!
in addition my english is not very god therefore try to understand me

i want to learn to create silent install for any software.where i can learn it?

second i want to make silent switchless for icq6 in hebrew i can do it by change thw finstall file in the archive that i download?

This post has been edited by rafi2391: 24 April 2008 - 12:51 PM


Share this topic:


  • 15 Pages +
  • « First
  • 10
  • 11
  • 12
  • 13
  • 14
  • Last »
  • 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