7zipsfx

7-zip SFX configuration issue


dI have created an archive in 7zip. (files.7z) i created a config.txt file (I actually created 3 different ones at different times). I use the command line tool to create the sfx which works fine. but when I run the .exe I do not get the expected results. It is as if the sfx ignores the config. I put the archive and config.txt in the 7-zip install directory and my command line looks like this:

C:\Program Files\7-Zip>copy /b 7z.sfx + config.txt + files.7z files.exe

When I run that the result looks like this

7z.sfx
config.txt
files.7z
1 file(s) copied.

Here is my config. I used notepad and made sure to save as UTF-8.

;!@Install@!UTF-8!
Title="MyApp Installer"
ExecuteFile="setup.exe"
InstallPath="%temp%\\My App"
;!@InstallEnd@!

I copy the files.exe to desktop in a folder. Run and it asks me where to extract, won't run the setup.exe (in the files.7z root)

What am I doing wrong? Ive been all over the 7-zip forum and can't find my error.


Solution

  • You're using the wrong SFX module -- you need to use 7zS.sfx instead of 7z.sfx . IIRC, 7zS.sfx doesn't come with 7-Zip by default, you have to download the 7z<ver>-extra.7z archive from SourceForge to get it.