The Ruby Devkit is a 7-zip based self-extracting archive.
I would like to invoke it silently without having to install 7-Zip to extract the files to a folder of my choosing, so that I can script the installation. I imagine it to be something like:
cmd> DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe /silent /dir="C:\DevKit"
But that, of course, doesn't work. What command line flags must I use to silently extract this archive into a folder of my choice?
Update 2017: The tool from 7zsfx.info is now dead and gone.
Original, old post from 08-2015:
If you are trying to extract an 7zip SFX (http://7zsfx.info/) archive:
sfx.exe -y -gm2 -InstallPath="C:\\your\\target\\path"
Switches Docu
-y
hide some prompts-gm2
hides the extraction dialog completely (silent mode)-InstallPath
sets the target path (you need double backslashes)7z SFX Guide
The official way to create a SFX package is to use
-sfx[{name}] : Create SFX archive
.And that means the created SFX packages uses two kinds of CLI options:
the passed through options you configured in your config, before creating the package.
You can think of it as parameter forwarding to the packaged executable. This parameter forwarding depends on the
SetEnvironment
andRunProgramm
configuration!The full process:
Package.7z
:Installer.msi
and additionalcrap.cab
file.Create config file
config.txt
:Now we generate
Test.exe
by combining sfx+config+archive into an executable.copy /b 7zS.sfx + config.txt + Package.7z SfxInstaller.exe
Note: 7zS.sfx is from the official 7zip extra package.
Now, when you run
SfxInstaller.exe
you can pass for instance/lv InstallerLog.txt
to create a install log, e.g.SfxInstaller.exe /lv InstallerLog.txt
try this:
Since 7-zip is used, simply create a self-extracting archive in .exe. and run it with switches -o and -y.
I use it to save space on USB drive. For instance, I run VDiskAir application infrequently. I create a self-extracting archive of the VDiskAir program folder (about 15MB):
NB: -mx9 is used here to maximise compression.
I create a DOS BAT to run the self-extracting VDiskAir.exe (about 5MB) created, save it as VDiskAir.bat containing:
I'm not worried that the VDiskAir folder (in %TMP% extracted with VDiskAir program files) is undeleted after running VDiskAir this way, since I have a BAT script to clear %TMP% on shutting down/starting up.