When your friend send 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 that allow you to create self-extracting archive, I am going to show you how you can do it with the native tool that come in your OS.
1. In this article, I will show you how to create self-extracting archive in Windows Linux (Ubuntu). The archive created in each of this OS is not compatible with each other. You can’t create an archive in Windows and expect it to work in Linux. Even in Linux, the archive might not be compatible with each distro. Therefore, 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 website.
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 8), 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 “
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”.
2. Open a terminal and type:
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. Mac OS X 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.
Let us know if this is useful to you.
Image credit: Archive Of Old Probate Books In A Library by BigStockPhoto