8/21/2020 0 Comments Create 7Zip Self Extracting Exe
Also the 7z format compresses files so small, if you are supplying installation packages over the internet via FTP, this is perfect.A self-extracting archive is a zip or similar compressed file that has been turned into an exe (executable).The advantage of this is that the recipient of the file only has to double click the exe and it will do everything automatically.
Previously in PART 1 I explained how to create an exe file that when run, would extract files and execute a program. Here Ill explain how to make a self-extracting archive that prompts the user to extract files to a location on their hard disk. The instructions are very similar, there are just a few differences and most importantly the configuration file used is different. You can find it here: Also, look on the Downloads page for 7z Library, SFXs for installers, Plugin for FAR Manager - click to download the 7zXXXextra.7z file. Instructions. Create 7Zip Self Extracting Exe Zip File But InThe 7zXXXextra.7z is a compressed archive file, like a zip file but in the native 7-Zip format. Extract 7zSD.sfx from the 7zXXXextra.7z file. Make a new folder for your project. By project I mean that if you plan to make a self-extracting archive you normally would already have some files you want to include in the archive. Also, you can reuse this folder if you update your files at a later stage. For the purposes of this example well call our project folder MyProject, but yours could be called anything. This configuration file can have any name but to make life easy I recommend you call it 7config.txt. Open Notepad Type the following. To create the self-extracting exe we will need to type a command at the command prompt (CMD). But why do that each time What we can do is make a command file and just editrun that file when you want to make your self-extracting exe. Open Notepad Type the following: echo off copy b 7zSD.sfx 7config.txt InstallMyFiles.7z InstallMyFiles.exe echo. Save the file as 7makeEXE.cmd to the MyProject folder you created earlier. Now inside your MyProject folder you should have the following files: 7zSD.sfx 7config.txt 7makeEXE.cmd Now all we need are the files you want to include in the installation package itself. These files should be compressed into a single.7z file. Do not make a.zip file, use 7-Zips native.7z format. Save the.7z file in the MyProject folder. Name the.7z file as ExtractMyFiles.7z (or whatever you have used in your 7makeEXE.cmd file). Look back at the 7config.txt we made earlier, youll see how you can customise this window. The user also has the freedom to click the yellow browse button and select a destination folder themselves. Once the user clicks OK the files are extracted and theyll get this prompt. I recommend this as its good confirmation for the user that all the files have been extracted. Again this is customisable from the 7config.txt file. Customisation. ![]() Because you only need to recreate your 7z file and double click 7makeEXE.cmd to rebuild the self-extracting exe file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |