If this is not the correct place to ask this, I apologize.
I use 7zip to create an installer package. Recently, my computer was updated, and I can no longer get it to work. I use a Windows Installer from Visual Studio 2010 to create the installation package, which I add to a file called setup.7z. I have confirmed that the files are archived correctly. I then call
copy /b 7zsd.sfx + config.txt + setup.7z setup.exe
which packages everything into a single file called "setup.exe
". Clicking on this would start the installer.
After the update, I can still make the file, and it looks just fine. However, if I try to click on it, I get a message saying 7-Zip: Unsupported method.
I have 7-Zip version 18.05 (x86) installed. Honestly, I am not sure where I got the 7zsd.sfx
file, but do remember having to hunt it down. It has no versioning, but was last modified on 7/13/2007. I don't know if the version matters, since you shouldn't need 7-Zip installed since this is a self-extracting file. However, it may be that the older version isn't able to unzip something zipped by a newer version.
I think the problem is in different versions of 7zip and 7zip.sfx used. Unfortunately SFX file is absent in most recent 7zip packages. Here is link to 7zip_extra from some old version that has both SFX file and .bat file to create the installer. Works fine for me.
Setup Tools: Why 7-Zip? There is a plethora of alternatives for creating (real) setups - and several are free: How to create windows installer (several links to tools for creating all kinds of setups). Brief descriptions below as well - under "
Alternatives
" (free tools, or tools with free features). These tools have been tested extensively to ensure running with minimal dependencies. Just something to keep in mind and evaluate I guess.7-Zip
Unsupported Compression?: 7-Zip: Unsupported method - use LZMA? I suppose this problem could still occur though that answer is a couple of years old.
Missing Runtime?: You might also want to do a dependency walker check on that
setup.exe
to see if it depends on something that is missing on the box (for exampleMSVCRT.dll
- or another runtime library). Just download the tool. Easy to use. Or maybe first try toinstall commonly used C/C++ runtimes
. Also, Dependency Walker is aging and shows garbage at times. There is the newer Dependencies - but it is not quite prime-time yet, but try it (clickReleases
tab). It has been updated to handle Windows API-sets and WinSxS (side-by-side assemblies). Note: several security software on virustotal.com detect Dependencies as a "risk tool, not a virus" (it is open source).LZMA SDK: The
7zSD.sfx
file would likely be from the LZMA SDK. And the command line you describe can be found in the main 7-Zip help file (not the SDK, but the one coming with the regular 7-zip installation). Section"-sfx (Create SFX archive) switch"
:Command Line Version => Switches => -sfc (Create SFX Archive
.Alternatives
Visual Studio 2017: The newest, free version of Visual Studio: Visual Studio Community 2017 can create
setup.exe
files via its Microsoft Visual Studio 2017 Installer Projects (this extension must be installed after installing Visual Studio 2017).WiX: The Open Source WiX toolkit can create
setup.exe
files with its Burn component. A WiX Burn ad-hoc sample- just to get the general idea - it has a learning curve. No GUI to help you, it is all XML-based. Use with or without Visual Studio.UPDATE on Advanced Installer: The free edition can only build MSI files, EXE bootstrappers can be built with the paid editions (any of them).
dotNetInstaller: There is also the dotNetInstaller Setup Bootstrapper - which I have never used. Here it is on github.com (source).
IExpress et al: There are security vulnerabilities that affect these self-extracting packages. Another reason I recommend a "real" deployment tool with dedicated resources to fix such things quickly, despite the niceness of having a
setup.exe
that can be opened directly in 7-zip.File Extraction
On the topic of extracting files from
setup.exe
files of various types:setup.exe
files created with WiX can also be extractedSome Links: