Inno Setup Tutorial
Inno Setup Tutorial
In theforumIt has been asked several times how to create an installation file for our
applications to be distributed. The same program has always been mentioned: Inno
Setup. But I haven't found an explanation for its operation (most likely, I don't)
I have known how to search
For this small tutorial, Inno Setup 5.1.6 has been used. According to the License.txt file that
It comes with the software, it can be used freely. It just says that if it is used for distribution
commercial applications, it would be a detail to mention that said software has been used, but that
it is not essential.
You can download the software by clickinghere.Select Stable Release and download the exe or the
zip (at convenience)
Once downloaded and installed, we will realize that the program is in English... wow
Man, what about me, who doesn't know English, how do I do it? Answer: Well, that's why I prepared this.
small tutorial, although in reality it's hardly necessary, but I felt like writing (and in passing,
to fatten up the website).
Moving a little ahead of the events (we haven’t created absolutely anything yet), also
we will realize that the program comes with several languages, among which,
Unfortunately, as of today (March 2, 2006), Spanish is not available. Clicking
hereyou can download the language file in Spanish. It's a tiny zip of 7 Kb, but it's just that
I have not found a way for it to be downloaded directly (thanks Francesc López for
report the bug). Download it wherever you want, but you copy the .isl file it contains into the
Languages directory. This directory is located where you have installed Inno Setup, usually
C:\Program Files\Inno Setup 5\
2. The first thing that appears is the option to create a New file (2 options) or open a 'Scripting
File exists.
3. We, who don't quite understand how this works, will choose the option 'Create a
new script file using the Script Wizard (with the wizard, easy mode)
5. Very nice. It implies that the assistant will guide us in the process of creating a script. Also
It advises that not all features are included in the assistant, but with the ones it offers,
we will be able to create something 'cool'. Next
6. As stated in the assistant's footer, the fields in bold are required. Thus, we will put the
name of our application
of the 'publisher'. The names do not necessarily have to be the same, I can call my application
Call control and in my name with version: Calls 2.0. The publisher is the name of
our company. We could put: MVP-Access or La Bellota Software and the website
related. Try to be consistent and don't add links to Walt Disney... Once filled, Next.
7. Now we define the directory where the program will be installed. By default, it offers us Program
Files directory. That is, the Program Files folder or Program Files (depending on
operating system language). We will not touch it. What we will define is the subdirectory, for
example: MVP-Access\Calls. The 'Allow user...' checkbox is used to allow the user to change the
directory where it will be installed. The check 'The application doesn't...' indicates that the application
does not need a directory (and where will it put it?), but we never marked it. Next.
8. Let's define what the main application of our 'package' is. To make it easy,
we will click on 'Browse...' and we will search for the file. It doesn't necessarily have to be an exe, it can be
any type of file with a 'known' extension that Windows has associated with a program
concrete. Thus, we could choose an mdb without problems.
The check 'Allow user to start....' indicates that, at the end of the installation, the user will be offered the
possibility of opening the program.
The check 'The application doesn't...' disables the 'main executable file', which typically
we will need. Therefore we will not mark it.
'Other application files': this is where we would add all the auxiliary files of our
application. In the case of distributing an application based on multiple databases, this is where
we would add the files (including the directories). We can also include the icons, images,
text documents, etc necessary for the operation of our application. At the request of
Sid, we studied how to add the files from a subdirectory and have them installed.
correctly.
Remove. Delete the file/directory that we had previously added to the compilation.
Next
9. Now we are going to decide the location of the application in the Windows start menu. If
we want to create a group because we are very "forward-thinking" and we distribute many applications,
we can put the name of the company/application. For example: MVP-Access/Control of
calls. The checks are useful for the following:
Offer the user the option to change the name of the Start menu directory
Offer the user the option to disable the creation of the start menu
Create a link to the webpage we indicated in point 6
Create an uninstall icon in the start menu directory
Offer the user the possibility to create an icon on the desktop
Offer the user the option to create an icon in the quick launch bar
10. Documentation that accompanies the installation program and will be displayed during it.
These fields are optional.
License file: path to the txt file that shows the terms of the license agreement of our
application. If we fill in this line, during the installation we will see a screen with the option
I accept the contract or I do not.
Information file shown before installation: path to the txt file that displays information about
our program or about the installation.
File path to the txt file that shows information about our
program. Usually, this is where we explain to the user what we have added new, some
trick or advice, etc. This would be the most similar to the ReadMe.txt
Once the files are assigned (at discretion), Next.
11. Here is where we decide in which languages the installation information will be displayed, that is, in
Which language will the installation assistant work in? It usually appears marked as English, but
You can choose more languages. If you have listened to me and downloaded the Spanish language, also
You will appear on the list. Next.
Custom compiler output directory: here we put the directory where the file will be saved
compiled
Compiler output base file name: the name of the exe file that will be generated. By default
you appear setup
Custom Setup icon file: icon that will identify the application. It is the one that appears in the menu.
from the start, desktop and quick launch bar once the application is installed.
Setup password: although I haven't tried it, it seems obvious that it will ask for a password in the
moment of the installation
13. Well, we have already created our script for the installation file. We click on Finish.
14. A message will appear that says: Would you like to compile the new script now?, come on, yes
We want to compile the setup.exe file that we have defined with the wizard. At discretion. This
message appears on the screen showing us the script:
Here we see how our installation script would look.
First appears [Setup], which are the main installation parameters.
After the languages in which the installation will be offered.
The [Tasks], basically if there will be the possibility to create icons on the desktop and in the
quick launch bar.
Then the [Files] files that will be installed with our application appear. For OCX and
DLLs, see point 16. For content tables (.tlb), see point 17.
Here is the link to our website, in case we have defined it in the
assistant.
[Icons] The icons that will be created in the start menu and quick launch bar.
Important: Ausias points out that the icons that are created will be created based on the type of
file that serves as the header functions. Thus, if our header application is a database
In Access, it will display the icon associated with Access databases.
You will see that this section has several lines. We must find those that refer to the
Header application. There are probably 2: the desktop one and the start menu one. These are
the lines that my Wizard has generated (and in green bold it needs to be added for it to
apply our icons)
{group}\Call Control
{app}\TEL10A.ico
{group}\{cm:ProgramOnTheWeb,Call Control}
v2.url
{group}\{cm:UninstallProgram,Call Control}
{userdesktop}\Call Control
IconFilename: "{app}\TEL10A.ico"
{userappdata}\Microsoft\Internet Explorer\Quick Launch\Call Control
{app}\Calls v2.mdb
Obviously, the icon must be included in the installation package and, for better performance,
to be in the same directory as the application (or in a subdirectory of it).
15. If in point 14 we answered no, and now we want to create the file, we select
the Build / Compile menu. This will create the Setup.exe in the directory we specified.
16. Installing an OCX or a DLL. Well, it seems that to install an OCX or a DLL we need to
put us directly within the script. We will then add the following line in the section
[Files]
This retrieves the OCX or DLL file that we want to have installed along with our
application, includes it in the Setup.exe and, when it is installed, proceeds to register it on the machine.
argument alwaysskipifsameorolder causes the file (if it exists) to be replaced without
ask nothing, with the exception that later versions are never overwritten.
17. Install type libraries (.tlb). Just like for an OCX or a DLL, we will need to get into
in the script directly.
18. Contribution of Rodolfo Vallejos. If one of the files we are installing is what we want
maintain when the user decides to uninstall our program, we can indicate it in the line of
Corresponding files (section [Files], obviously) adding this Flag: uninsneveruninstall
19. Another contribution from Rodolfo Vallejos. If we need to get our hands into the Windows registry,
we can add this at the end of the Script:
Registry
HKCU
create value if doesn't exist
Well, it seems like this is a bit more complete now. I think now we just need to figure out how to ask.
a product key, if it can be done. I am also looking at the 'updates' of our
product, which seems that can also be done.
As soon as I have a bit of time, I will try to investigate it. In any case, any comments,
If you have any clarification or expansion on what is stated here, you can send it to me by email.
A greeting.