• 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

:hello: In other words run the installer then archive the extracted files along with the following in the config.txt

Thanks

Since I posted I redownloaded the open office installer, and redid the steps and I get the same error box

Run the downloaded installer and use the extracted files.

The .cmd file should look like this:

@echo off
msiexec /i openofficeorg24.msi ALLUSERS=1 SELECT_WORD=1 SELECT_EXCEL=1 SELECT_POWERPOINT=1 ADDLOCAL=ALL /qb! /norestart
exit

or

 @echo off
msiexec /i openofficeorg24.msi ALLUSERS=1 SELECT_WORD=1 SELECT_EXCEL=1 SELECT_POWERPOINT=1 ADDLOCAL=ALL /qn /norestart
exit

The second does not have the progress bar.

0

Share this post


Link to post
Share on other sites

Thanks for this thread !

I want to integrate MS .NET Framework 1.1 SP1 & 2.0 in my xp cd.

I have used this french forum. But I don't know how to make a 7-Zip switchless installer.

For information, I have in my \$OEM$\$1\apps\: 2 folder (dotnet11 + dotnet02) and 1 file (dotnetfx.bat), this batch :

@echo off
echo Installing Microsoft .NET Framework 1.1 SP1 ...
echo ===============================================
start /wait msiexec /i %systemdrive%\apps\dotnet11\netfx.msi
start /wait msiexec /i %systemdrive%\apps\dotnet11\langpack.msi /qb
echo.
echo Installing Microsoft .NET Framework 2.0 ...
echo ===========================================
start /wait msiexec /i %systemdrive%\apps\dotnet02\netfx.msi ADDEPLOY=1 REBOOT=REALLYSUPRESS /qb
start /wait msiexec /i %systemdrive%\apps\dotnet02\langpack.msi ADDEPLOY=1 /qb
echo.

Thanks for help.

Edited by insan
0

Share this post


Link to post
Share on other sites

It's ok now, I have solved my problem :

1. To compress with 7-Zip : dotnet11, dotnet02, dotnetfx.bat, StartX.exe

This create : dotnetfx.7z

2. To create a folder containing : dotnetfx.7z, 7zs.sfx, Msistub.exe, config.txt

______ config.txt_________

;!@Install@!UTF-8!

RunProgram="dotnetfx.bat"

;!@InstallEnd@!

_______________________

3. To make in command prompt : copy /b 7zs.sfx + config.txt + dotnetfx.7z dotnetfx.exe

This create dotnetfx.exe who I use to instal MS .NET Framework 1.1 SP1 and 2.0 silently.

Edited by insan
0

Share this post


Link to post
Share on other sites

Hi,

Is there any way to make the desktop the default folder for the Sfx extraction?

Ty

Edited by JoaoVr
0

Share this post


Link to post
Share on other sites

Hi all,

Thanks for the great tut.

I have a small, but fatal (to me) problem with it. I hope you can help me out:

config.txt

;!@Install@!UTF-8!
RunProgram="program.exe"
GUIMode="2"
Progress="no"
;!@InstallEnd@!

copy /b 7zS.sfx + config.txt + 7zSFX.7z test.exe

I ve created the 7z archive using the latest 7zip - v 4.62 and the SFX module from the current tutorial.

When the "program.exe" is started the application window is not on focus, it appears to be behind the current window. It looses focus even if started from the Desktop

It is shown on the task bar but I have to switch to it manually. what bugz me out is that only happens like 30% of the starts .. some times it is on focus.

I checked the startup path and they are all started from diff folders in the temp folder and there is no pattern.

Thank you.

Edited by bojinov
0

Share this post


Link to post
Share on other sites

Ok I'm having an issue (probably my inept scripting)

I'm trying to make Realtek's HD audio drivers & app install silently, in the readme it says

--------------------
Silent Installation:
--------------------

Run "Setup.exe /s /f2<path\LogFile> /z[-rp<path\LogFile>]"
i.e. setup.exe /s /f2c:\mylog.log /z[-rpC:\RHDSetup.log]

I tried all sorts of formating for it and none of it seems to work. The last one i tried I created the Config.txt containing an almost exact copy of their command and to no avail :sigh:

;!@Install@!UTF-8!
RunProgram=setup.exe /s /f2c:\test\mylog.log /z[-rpC:\RHDSetup.log]
;!@InstallEnd@!

Just get a msgbox with the header 7-zip and the message saying config failed

Could someone help me figure out how to setup the config.txt right please?

I just need to get this one driver/program to install silently and I'll have my whole boards devices slipstreamed into XPhome

If you need any extra info don't hesitate to ask!

0

Share this post


Link to post
Share on other sites
;!@Install@!UTF-8!
RunProgram=setup.exe /s /f2c:\test\mylog.log /z[-rpC:\RHDSetup.log]
;!@InstallEnd@!

RunProgram=setup.exe /s /f2c:\\test\\mylog.log /z[-rpC:\\RHDSetup.log]

IMPORTANT! Certain two-symbol sequences in the Value are parsed as follows:

\\ = \

\" = "

\n = caret return

\t = tabulation (TAB)

As a result, you MUST use DOUBLE backslashes (\\) wherever you normally use backslashes (\) (e.g. in paths or dialog texts). Similarly, if the Value contains double quotes ("), you MUST precede them with a backslash (\").

0

Share this post


Link to post
Share on other sites

Interesting...

I asked this on ryanvm forums and I was told I forgot the quotes

RunProgram="setup.exe /s /f2c:\test\mylog.log /z[-rpC:\RHDSetup.log]"

was their suggestion, which worked. However Im having difficulty with the PC being rebooted once the installer has ran, and realtek says the silent install shouldn't reboot the PC...

I'll try it with your code and see if I don't come out any better.

Nope, just tried your code and it's not working again

Edited by w00dr0w
0

Share this post


Link to post
Share on other sites

If the sfx extract the installer on the hdd and start installation from there works?

;!@Install@!UTF-8!
InstallPath="%temp%\\RHD"
RunProgram="setup.exe /s /SMS"
Delete="%temp%\\RHD"
GUIMode="2"
;!@InstallEnd@!

0

Share this post


Link to post
Share on other sites
If you need any extra info don't hesitate to ask!

Could it be your c:\mylog.log and C:\RHDSetup.log were in wrong location? As far as I understand, mylog.log or RHDSetup.log should normally be in same directory as your setup.exe. Just my guess.

0

Share this post


Link to post
Share on other sites
If you need any extra info don't hesitate to ask!

Could it be your c:\mylog.log and C:\RHDSetup.log were in wrong location? As far as I understand, mylog.log or RHDSetup.log should normally be in same directory as your setup.exe. Just my guess.

that just tells the install where to put the log of the install when it's installing.

ill have to try that other code here in a few, though having it run the manual installer would be undesirable, i guess i can manage

0

Share this post


Link to post
Share on other sites

It is my error, inverted commas in line are obligatory!!! Should be so:

RunProgram="setup.exe /s /f2c:\\test\\mylog.log /z[-rpC:\\RHDSetup.log]"

About syntax of the command

setup.exe /s /f2c:\mylog.log /z[-rpC:\RHDSetup.log]

I do not know, but if it works in bath a file in such kind and in a file of a configuration of the modified module will work. Check up its work at first in bath a file, and then already working variant transfer to a configuration file considering inverted commas and double slashes.

Edited by gora
0

Share this post


Link to post
Share on other sites
It is my error, inverted commas in line are obligatory!!! Should be so:

RunProgram="setup.exe /s /f2c:\\test\\mylog.log /z[-rpC:\\RHDSetup.log]"

About syntax of the command

setup.exe /s /f2c:\mylog.log /z[-rpC:\RHDSetup.log]

I do not know, but if it works in bath a file in such kind and in a file of a configuration of the modified module will work. Check up its work at first in bath a file, and then already working variant transfer to a configuration file considering inverted commas and double slashes.

I have the installer working, perfectly using this config.txt

;!@Install@!UTF-8!
RunProgram="setup.exe /s /f2c:\mylog.log /z[-rpC:\RHDSetup.log]"
;!@InstallEnd@!

with one exception

I'll post what I posted @ ryanvm forums

It's restarting the PC as soon as it's finished installing. I need to turn this off. I don't know if there's a parameter I can add to config.txt to keep it from restarting the PC, I checked the setup's .ini file and found some promising stuff, but I'm no coder and I have no clue what I need to do. So hopefully one of you can help me with this.

The interesting info in the setup.ini is below

[General Settings]
OEM = 0
DelDatUpd = 0
DelDatUni = 0
RtkLogON = 1
ForceSetupQFE = 0
ForceInstallRtk = 1
RtkAPODbgReg = 0
RtkAPOReg = 1
RemoveHDQFE = 0
QFEReboot = 0
fW2KForceRebt = 0
SilentReboot = 0
NUpgradeDrv = 0
NRunClsWin = 0
QFEOption = /o /norestart /passive
HideWinParm = /go

I tried adding /norestart to config.txt, but that doesn't do anything. I'm wondering if I can edit the .ini itself and change one of those flags to keep it from restarting after installing?

Once again your time, effort, and help are greatly appreciated...

large test

0

Share this post


Link to post
Share on other sites

What a great guide, thanks so much!

To automate the process even more:

1. Modify 7zs.sfx as desired according to OP's instructions

2. Copy 7zS.sfx to your SYSTEM32 directory

3. Enter the following into a batch file:

-------------------------------BEGIN CODE-------------------------------

@echo off

cls

%~d1

cd %~p1

echo Enter the command (e.g. "msistub setup.msi /qb-!") without quotes:

echo.

SET /P CMDLINE=

echo ;!@Install@!UTF-8! > config.txt

echo RunProgram="%CMDLINE%" >> config.txt

echo ;!@InstallEnd@! >> config.txt

copy /b %windir%\system32\7zs.sfx + config.txt + %1 %~n1.exe

del /q config.txt

------------------------------- END CODE -------------------------------

(The "code" tag messed up the echo commands)

4. Save batch file as %WINDIR%\System32\CreateInstaller.bat (save as UTF-8 as stated by original poster)

5. In Windows Explorer, Go to the "Tools\Folder Options"

6. under the "File Types" tab, go to the .7Z extension and click "Advanced"

7. Click "New..."

8. Under "Action" type "Create Installer" without quotes

9. Under "Application used to perform action" type

%WINDIR%\system32\CreateInstaller.bat "%1"

10. Now, right-click any .7Z file you want to convert into an installer, and click "Create Installer"

11. A DOS window will prompt you for the command you want to execute within the 7Z archive. Enter it without quotes.

12. Voila! The installer appears alongside the 7Z file.

Sorry I don't have time at the moment to upload screen shots. Just wanted to post this up. It's been a *great* tool for me. Thanks!

Edited by judolphin
0

Share this post


Link to post
Share on other sites

hi , nice guide ! :yes:

my problem is this

;!@Install@!UTF-8!
RunProgram="tfb.exe"
$location = @ProgramFilesDir & "\tfb\test\"
fileCopy("tc.plg", $location)
;!@InstallEnd@!

I like 7zip too, for it wonderful compression - but its not work :no:

Any Ideas?

0

Share this post


Link to post
Share on other sites

The configuration file is incorrect. From what i see, i guess you used AutoIT. 7-Zip (written in C) and AutoIT are totally different things. I suggest you use my little application, SFXMaker which automatizes the process of creating switchless installers. You can find it in this forum or at iSoft Official WebPage :)

0

Share this post


Link to post
Share on other sites

I am a Noob to this. Where can i find the $OEM$ Folder?

Edited by znogi
0

Share this post


Link to post
Share on other sites

Hello ppl

How do you know to make all the switches? & all the cmd commands?

i need a guide please for the switches

Thank you for your help...

Edited by ghostE
0

Share this post


Link to post
Share on other sites

DigitalAZ

it u are hving problems with keytotime guide

i have a video! yes a video on how to 7zip office 2003

check the link on my sig

keytotime

u are welcome to link or use my video as a ref to making 7zip.

:)

I cant find your video !

0

Share this post


Link to post
Share on other sites

I act according to your instructions and I made a file setup with 7Zip

But the program only compressed mode is removed and the file runs the installation program should I install it myself. While the installation program should automatically be done. Please guide me. :hello:

This my Config File :

config:

;!@Install@!UTF-8!

GUIMode="2"

RunProgram="Setup.exe"

;!@InstallEnd@!

And use this command :

copy /b 7zsD.sfx + config.txt + (Setup.exe).7z (Setup.exe).exe

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.