How to create self-extracting archives on Windows 10 with IExpress
A self-extracting archive is useful; it allows you to extract archives without additional software. All you have to do is double click the archive and it will automatically extract the files within. In this post, we will guide you on how to create self-extracting archives using the native tools that ship with your Windows 10 operating system.
Before we jump right into it, a little background.
A self-extracting archive (SFX/SEA) is a computer-executable program that contains compressed data in an archive file combined with machine-executable program instructions to extract this information on a compatible operating system and without the necessity for a suitable extractor to be already installed on the target computer. The executable part of the file is known as the stub and the non-executable part of the archive.
While you can create a self-extracting archive in Windows and Linux, the created archive is not cross-platform compatible. You can’t create a self-extracting archive in Windows and expect it to work in Linux. Even in Linux, the archive might not be compatible with each distro. If you are planning to send the self-extracting archive to your friend, make sure you are using the same OS platform as him/her.
A self-extracting archive can impose a risk if you are not sure of the content within. Unless you are expecting to receive a self-extracting archive from a trusted source, do not open any self-extracting archive, particularly those you downloaded from some shabby websites.
How to create self-extracting archives on Windows 10
To create self-extracting archives on Windows 10, you can use the inbuilt tool – IExpress.exe.
Here’s how:
Press Windows key + R to invoke the Run dialog.
In the Run dialog box, type iexpress and hit Enter.
On the first screen, select Create a new Self-Extraction Directive file.
Click Next.
On the next screen, select Extract files only.
This will create a self-extracting archive, rather than an installer.
Continue to click Next and follow the wizard to create the archive.
Once completed, you will have an EXE file where you can double-click to extract its content.
That’s it on how to create self-extracting archives on Windows 10.
How to Create Self-extracting Archives Without Installing Additional Software
When your friend sends you a compressed file with a relatively unknown format, such as 7z, bz2 etc, don’t you hate it when you need to install additional tool just to be able to extract the content from the archive? This is where self-extracting archive is useful. It allows you to extract archives without additional software. All you have to do is double click the archive and it will automatically extract the files within. While there are lots of applications for you to create self-extracting archive, here are the native tools that come in your OS.
Note:
1. While you can create self-extracting archive in Windows and Linux, the created archive is not cross-platform compatible. You can’t create a self-extracting archive in Windows and expect it to work in Linux. Even in Linux, the archive might not be compatible with each distro. If you are planning to send the self-extracting archive to your friend, make sure you are using the same OS platform as him/her.
2. Self-extracting archive can impose a risk if you are not sure of the content within. Unless you are expecting to receive a self-extracting archive from a trusted source, do not open any self-extracting archive, particularly those you downloaded from some shabby websites.
Creating self-extracting archive in Windows
Windows comes with this builtin tool – iexpress.exe that allows you to create self-extracting installer. The problem with Microsoft is that it loves to hide these useful nifty tools from the public, so it is unsurprisingly to see that few people have heard of this tool.
In Windows (from XP up to Windows 10), open the “Run” menu and type “iexpress”. Select the “iexpress” program.
On the first screen, select “Create new Self-Extraction Directive file” and click Next.
On the next screen, select “Extract files only”. This will create an self-extracting archive, rather than an installer.
Continue to click Next and follow the wizard to create the archive. Once completed, you will have an EXE file where you can double-click to extract its content.
Creating self-extracting archive in Ubuntu
Ubuntu comes with an Archive Manager that allows you to compress files, but it doesn’t allows you to create a self-extracting archive. To do that, we will have to make use of the unzipsfx command.
For this example, let’s assume that we want to create a self-extracting archive “test” that contains “test.txt”.
1. First, compress the “test.txt” to zip format (using the Archive Manager). You should now have a “test.zip” file that contains “text.txt”.
What this command does is to prepend “unzipsfx” to the beginning of “test.zip” and save it as a new file “test”.
3. Next, we are going to change the permission of the file and do adjustment to the self-extracting archive:
That’s it. Whenever you double-click “test”, it will automatically extract the files contained within itself.
Managing self-extracting archive in Mac
There is no native tool for you to create self-extracting archive in Mac, simply because there is no need to. macOS handles compressed files very well. The default application – Archive Utility – extracts compressed files when you double-click on the archive. In addition, the Unarchiver app supports tons of compression format, so you don’t have to worry about compatibility issue in Mac.
While self-extracting archive has gained a bad name for being the prime source to spread virus, that doesn’t mean it is all bad and nothing good. When used properly, it can be a useful tool as well. In most cases, Windows users will benefit the most from self-extracting archives since the support for various compression formats is still lacking in Windows. However, the EXE file format for the self-extracting archive can be a big turn off for those who are very conscious about security.
Damien Oh started writing tech articles since 2007 and has over 10 years of experience in the tech industry. He is proficient in Windows, Linux, Mac, Android and iOS, and worked as a part time WordPress Developer. He is currently the owner and Editor-in-Chief of Make Tech Easier.
Windows self extracting installer
Tagged as
Stats
Comments and Discussions
First Prev Next
14 gig file
Brian C Hart
3-Mar-17 10:08
Hi,
I myself am a C++ and C# programmer. I have VMs that I deploy for other developers/employees that I need to quickly deploy. So, I chained a bunch of setups together using unattended batch files for such things as web browsers, Adobe Reader, Office etc. into a ZIP file called a «productivity pack,» and I am looking for a way to basically take my ZIP file and put it inside a SFX and therefore it can be downloaded and installed in a user friendly way by my IT person.
However, the files for all the setups when combined amount to something like 14 GB of size totally. Can this project handle large files such as that? If not, what would be the proper modification(s) if any, to this project’s code, such that it will tolerate large files?
Brian Hart
Sign In· View Thread
Can an unattended mode be accessed and established at compile time as well?
cpmelola
15-May-12 14:22
I did not read the docs first. I have a requirement that the user need not confirm or do anything (no UI).
Sign In· View Thread
Deplying my application from VISTA
AlexEvans
10-Aug-09 12:45
Hello all,
I have moved recently from my old XP machine to Windows Vista (Yes, I am slow. ). Runing now with Service Pack 2 and Visual Studio 2005, developing in C++ (not managed).
When I recently had to make a change in my program, it works fine on my PC, but when trying to run it on the client’s machine it fails.
It comes up with «The application has failed to start because the application configuration is incorrect. blah blah. «
I tried looking for the latest redistribution package, but the latest one I can find for VS 2005 is dated sometime in 2007.
It seems I managed to isolate the problem to a specific VS 2005 patch called «Security Update for Microsoft Visual Studio 2005 Service Pack 1 » — If I install this, my resulting EXE no longer runs on an XP machine.
Any suggestions? PLEASE.
Cheers Alex
Sign In· View Thread
Re: Deplying my application from VISTA
kustt110
15-Aug-09 6:11
you probably have to deploy a newer version of the runtime DLLs on the target machine.
Sign In· View Thread
Re: Deplying my application from VISTA
AlexEvans
15-Aug-09 11:21
Thanks for that. Probably a good idea.
Will be good if you can point me out to where from to get it.
Cheers Alex
Sign In· View Thread
Re: Deplying my application from VISTA
kustt110
21-Aug-09 8:09
please google for «vcredist» or «vcredist.exe», also check if your VC installation has a file with a similar name. Also keep in mind that VC comes with MSI merge modules (msm files) that you can use with your installer, if it is MSI based.
— Stefan
Sign In· View Thread
Re: Deplying my application from VISTA
AlexEvans
21-Aug-09 13:23
Thanks for the feedback. I have been using vcredist fro a long time, I searched for the latest, and installed it on the target machine, but still no go.
It seems something in the security patch #1 is newer than what is in the vcredist package.
Hope someone has another idea maybe.
Cheers Alex
Sign In· View Thread
Re: Deplying my application from VISTA
kustt110
25-Aug-09 10:17
As far as I know, the latest patch for ATL that patched a great deal of VS2005 and 2008 header files and libraries made a couple of new runtime DLLs necessary for builds that are made after this patch. I dunno if a new vcredist was deployed as well as part of this patch. I am glad that I almost exclusively use static linking and that VS2010 will relieve us from the manifest hell, because VS2010 will not use manifested runtimes anymore.
Sign In· View Thread
Source Code Size
knestel
1-Dec-08 19:52
Just a tiny thing: the source code size is shown in the article with 510 MB (megabytes!). I downloaded it anyway and was happy that it only had 510 kB
Sign In· View Thread
Re: Source Code Size
Stefan Kuhr
7-Dec-08 8:21
I have already noticed this and it will be fixed with the next update that will hopefully be online in a few days matter.
Sign In· View Thread
folders
Member 4510372
27-Nov-08 16:58
I am installing a program that has .net and sql express as prerequisites. These prerequisites sit in folders of their own next to the main msi and setup file. They can’t sit within the same folder. What do you suggest?
I thought about zipping the files and including the zip in your sfx . then running a command to unzip them . then possibly running setup.exe . is there a better way?
Reading your article, it did say that you have a limitation on including folders . so i am out of luck eh?
Sign In· View Thread
Re: folders
Stefan Kuhr
7-Dec-08 8:25
Hello Member 4510372,
yes I am afraid you are out of luck then. Supporting a zip file structure with subfolders was not on my agenda for my first version of a self-extracting installer because all I personally needed was a flat directory where I could my individual MSI files into. Maybe a subsequent version will support subfolders.
Sign In· View Thread
Can I use this or is there a program to put files/folders inside a pre installed game directory?
ou8it
4-Nov-08 10:33
I really need to simplify the installation of additional game files. These files need to be placed in two folders inside the games install directory.
The game is located at c/program files/shockwave/Think Tanks, and the self installer I wanted to try to create would put additional files in c/program files/Shockwave/Think Tanks/game/ and in c/program files/Shockwave/Think Tanks/game/client folders. There is an additional small .cs file that goes in the main Think Tanks folder. Is it possible to create something that will simplify the placing of these files as most of the players trying to expand the game are young and not computer literate.
Thanks in advance for any input.
Sign In· View Thread
Re: Can I use this or is there a program to put files/folders inside a pre installed game directory?
Stefan Kuhr
15-Nov-08 10:18
Yes, surely. Write an MSI file that installs the files into these folders and invoke them using /qn so users cannot accidentally install into a fifferent location. But I don’t see how this is related to this article. Could you elaborate?
Sign In· View Thread
Re: Can I use this or is there a program to put files/folders inside a pre installed game directory?
ou8it
25-Nov-08 12:47
Hi Steve, I’m not sure how I ended up posting it here. I guess Ive been searching online for answers and I thought self extracting installer was close to what I needed. I know a bit about computers, but I don’t think I have what it takes to make MSI or invoke with /qn because I don’t know what that is. I’d like to learn because what I need is so simple, yet It would solve a 5 year old problem of players updating a game. Its only a matter of 2 or 3 folders and one text file or main.cs file in the main folder. I have been spending much time one on one, on yahoo messenger helping players update but I’m afraid I can’t continue helping one on one. I run a website where I can simply host a file for download and the players can just extract it and run it and the file/folders get put into the right place/directory. This would be the greatest thing I can contribute to the community and is much needed. Any help with this would be fantastic. Also thanks for the reply and have a great T-Giving and holiday’s.
Sign In· View Thread
Can you please mention why you didn’t use for example WIX of NSIS?
Ramon Smits
23-Oct-08 2:13
You listed a couple of requirements for your installer but I don’t see any requirements that aren’t supported by WIX or NSIS.
Sign In· View Thread
Re: Can you please mention why you didn’t use for example WIX of NSIS?
Stefan Kuhr
23-Oct-08 4:22
correct me if I am wrong, but WiX is for creating individual msi files, not for Ueber-Setups, that combine several individual setups into one single large executable. In fact, the three msi files that are part of the demo project, have been created with WiX version2 and are modifications of a sample that comes from the famous tramontana WiX turorial. How do you create a similar setup that combines multiple ones in WiX?
Regarding NSIS: I looked at NSIS a few months ago and found it terrible. I personally stick with WiX (mostly v3 today) and MSI for individual setups. But that’s only my position, your mileage may vary.
Sign In· View Thread
Re: Can you please mention why you didn’t use for example WIX of NSIS?
Ramon Smits
23-Oct-08 4:48
I’m sorry you are indeed correct regarding the multi-setup issues with wix. It was a long time ago that I needed similar requirements and thought I then solved it with wix 100% but after browsing the sources it did not.
I used another boot to bootstrap it up with dotnetinstaller which can be found at the following location:
NSIS can do this in its own scripting so no wrapping up required there and I too don’t use it as it cannot be used in corporate environments because you cannot easily add those packages to for example group policies as can be done with msi packages.
Sign In· View Thread
Re: Can you please mention why you didn’t use for example WIX of NSIS?
Stefan Kuhr
23-Oct-08 7:56
That’s interesting. I will have to take another look at NSIS to see how a multisetup thing looks like with NSIS. Before I started working on this project I certainly looked at dotNetInstaller as well and hoped it would solve my problem. But back then (it might have changed meanwhile) it didn’t have the option to pack everything into one big file, at least not in the stable build. I also found no way to have independent setups launched from dotNetInstaller, only one setup and its dependent ones, but maybe I was just too stupid to get dotNetInstaller to work for me this way. But actually, dotNetInstaller was the thing that inspired me to write the code for this project. In fact, I think if you have the need for dependent individual setups, especially with .NET based apps, dotNetInstaller is probably the best choice. But I currently do no .NET based development and therefore have no such dependency, therefore the good stuff in dotNetInstaller seems to be of no help for me. Therefore I wrote the code and this article. I also dunno if dotNetInstaller has the option to just ShellExecute stuff and has special handling of MSI files. But it wouldn’t surprise me either if it had because I think dotNetInstaller is a good thing to use.
Sign In· View Thread
How can I compile it successfully?
Johnson Zhou
20-Oct-08 22:19
I compiled your project using VS2005 Team Edtion. I got following from output window. What shall I do now?
4>sfx.cpp 4>h:\installer\sfxcp\sfx\sfx\sfx.cpp(213) : error C3861: ‘__analysis_assert’: identifier not found 4>h:\installer\sfxcp\sfx\sfx\sfx.cpp(222) : error C3861: ‘__analysis_assert’: identifier not found 4>h:\installer\sfxcp\sfx\sfx\sfx.cpp(223) : error C3861: ‘__analysis_assert’: identifier not found
Sign In· View Thread
Re: How can I compile it successfully?
Stefan Kuhr
23-Oct-08 4:30
Hello Johnson Zhou,
You are right. I always have one of the latest SDKs (currently Vista SDK or Server 2008 SDK) integrated into VS2005. If you have only VS2005 installed, then these errors appear, because obviously there are no headers for PREfast available with a minimum install of VS2005. I will correct this as soon as possible.
Sign In· View Thread
Re: How can I compile it successfully?
Stefan Kuhr
23-Oct-08 8:03
Hello Johnson Zhou,
I updated the article to reflect in the text that you definitely need a recent SDK (either the Vista SDK or the Server 2008 SDK) in addition to your VS2005 installation to compile the source code. This is because for some strange reason, VS2005 does not ship with an x86 version of msi.lib (strangely enough, the x64 version is there). The compilation errors you see come from my usage of PREfast macros (when compiling with the /analyze command line switch) to make the code PREfast clean. Both SDKs I mentioned properly support these macros, just make sure you integrate them into VS2005 with their «Integrate Windows SDK with Visual Studio 2005» start menu entry. If you use VS2008, you don’t need an additional SDK.
Sign In· View Thread
Re: How can I compile it successfully?
Johnson Zhou
24-Oct-08 21:40
Hi. Stefan, Excellent job! I can compile it with VS2008. thanks a lot. By the way, I thank NSIS is also a good job. You can try it again. Just one little thing, NSIS may has some problem with UAC of Vista(I can not download the UAC plugin, don’t know why).
Sign In· View Thread
Last Visit: 31-Dec-99 18:00 Last Update: 18-Apr-21 6:56
Refresh
1
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.