How to create installer / self extracting archive ?
An Installer is a file which stores all the data of a given program in one package. When it is run. It automatically extracts the files in the right location by user's command. All .exe files we use to install any software on our computer is an installer.
You can easily create an installer like professional softwares using a Compression software called WinRar. A self extracting Archive is used for this purpose. It is an easy way to package all your files/ program etc. into one so that your users can use your software or files without any hassle.
I am going to create an installer for Password Shell, Password Shell is a software created by Code Nirvana that manages your confidential data like passwords, Bank PIN through encryption... It consists of two files:
→ Password Shell.exe
- Select all the two files above to include in your installer.
- Right Click -> WinRar -> Add to archive ...
- Check "Create SFX archive" and "Create solid archive".
- In the "Archive name" field, change the suggested name given by WinRAR to Password Shell.exe, then choose "Best" from the "compression method" combo box.
- Go to "Advanced" tab. Press "SFX options". The "Advanced SFX options" dialog box appears with the "General" tab activated.
- In the "Path to extract" field, type "Password Shell" without quotes.
- - This means that the package (SFX) will be extract, during installation, to:%ProgramFiles%\PasswordShell.
- Make sure the "Create in "Program Files" radio button is selected.
- Make sure the "Save and restore paths" check box is not checked.
- Still in the "Advanced SFX options" dialog box, press the "Advanced" tab.
- Press the "Add shortcut..." button. The "Add shortcut" dialog box appears.
- Select "Start Menu/Programs". In the "Source file name" field, type "Password Shell.exe" without quotes. This is the name of the file you create a shortcut to which is you selected to be in your installer.
- In the "Destination folder" field, type "PasswordShell" without quotes.
- This is the name of the shortcut folder that will be created under:%UserProfile%\Start Menu\Programs.
- In the "Shortcut description" field, type: "Secure ID's and Passwords" without quotes.
- In the "Shortcut name" field, type "Password Shell" without quotes.
- This is the link that will appear as: %UserProfile%\Start Menu\Programs\PasswordShell\Password Shell.lnk
- Press "Ok" to return back to the "Advanced" tab. Repeat the same steps again to create more shortcuts if needed.
- Still in the "Advanced SFX options" dialog box, press the "Modes" tab.
- Under "Silent mode", select "Hide all". This tells the SFX not to show setup screens. In this case, I left it un-checked.
- Go to Update Tab and Under "Overwrite mode", select "Overwrite all files". This tells the SFX to overwrite any files pre-existing in the destination folder:%ProgramFiles%\PasswordShell, if there's any.
- Press "Ok" on the "Advanced SFX options" dialog box to close.
- You can add Text or Icon to the SFX, for that apply changes in Text or Icon Tab. In this case i am not doing that.
- Press "Ok" on the "Archive name and parameters" dialog box and wait for the compression process to finish. Password Shell.exe is now created.