Search:
Advanced search
|
Browse by category:
|
Contact Us |
How to make a self extracting archive that runs your setup.exe with 7zip -sfx switch |
|||||||||||
The scenarioWhen you use the default Microsoft Visual Studio Installer (yes, it is back as an extension for VS 2013 – Visual studio Installer Projects Extension), the output are two files:
So you want to provide a download for your product from your website as a single file. Some possible options include:
The self extracting archive option seems the best. The problemI wanted to use 7Zip to create the self extracting archive but I could not seem to find a simple guide that explained exactly how to do it. I have finally worked it out and below are some detailed instructions. How to make a self extracting archive that launches your installer after extractionIt is actually quite simple to do if you follow these easy steps. Step 1 – Setup your installation folderTo make this easy create a folder c:\Install. This is where we will copy all the required files. Step 2 – 7Zip your installers
Step 3 – Get the 7z-Extra sfx extension moduleYou need to download the 7z-Extra.
Step 4 – Setup your config.txtI would recommend using NotePad++ to edit this text file as you will need to encode in UTF-8, the following instructions are using notepad++.
Edit this replacing [SOFTWARE v1.0.0.0] with your product name. CheckPointYou should now have a folder “c:\Install” with the following 3 files:
Step 5 – Create the archiveThese instructions I found on the web but nowhere did it explain any of the 4 steps above. You are finished Run the installerDouble click on MyInstaller.exe and it will prompt with your message. Click OK and the setup.exe will run. Everything is easy… once you know how. P.S. Note on AutomationNow that you have this working in your c:\Install directory I would create an “Install.bat” file and put the copy script in it.
Now you can just edit and run the Install.bat every time you need to rebuild a new version of you deployment package.
|