0% found this document useful (0 votes)
67 views13 pages

Inno Setup Installation Tutorial Guide

The document is a tutorial on using Inno Setup, a freeware installer for applications, detailing its features and installation process. It explains how to create an installation package through a guided setup, including specifying application details, adding files, and customizing the installation experience. The tutorial also provides a sample script generated by Inno Setup, illustrating how to define application properties and manage installation files.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views13 pages

Inno Setup Installation Tutorial Guide

The document is a tutorial on using Inno Setup, a freeware installer for applications, detailing its features and installation process. It explains how to create an installation package through a guided setup, including specifying application details, adding files, and customizing the installation experience. The tutorial also provides a sample script generated by Inno Setup, illustrating how to define application properties and manage installation files.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Tutorial on the use of

INNO SETUP
Installer by Jordan Russell

Enzo Iorio 2006

[Link]
Tutorial on INNO SETUP –[Link]

General information about Inno Setup

Inno Setup, now at version 5, is a completely installer for your applications.


freeware.

Used by many programmers to distribute installation packages of their


applications, it can be downloaded from the website of its creator Jordan Russell at the [Link]

Inno Setup is completely programmable through a script file in a similar language.


to Turbo Pascal for Ms Dos (which later evolved into Delphi for Windows).

The Inno Setup script is a true programming language, complete with structures.
decisional, cyclical structures, functions or procedures and directives for the setup compiler.
It allows the use of variables and functions typical of a visual language such as
message box, in short, it is a programming language, the functions on solving the
screen, very useful if you want to block the installation if the video resolution is lower than that
volute.

This tutorial is not a comprehensive manual on how to use Inno Setup, but it is just a series of
instructions for using Inno Setup to obtain an installation setup for your application, in
a little time.

Page 2 of 13
Tutorial on INNO SETUP –[Link]

Inno Setup Installation

Once Inno Setup is downloaded, it is good to also download, through the link on Inno Setup.
Translations, the Italian language called [Link]. translated by an Italian programmer, who
Like many around the world, they have contributed to the spread of Inno Setup, like programs.
third-party additions such as InnoScript, which will be mentioned later.

The downloaded translators do not allow obtaining the menus or the various operation messages of Inno.
Setup in Italian, but it is needed to obtain an installation setup for one's application in Italian.

Once Inno Setup is installed on your computer, the file is inserted into the Languages folder.
translator in Italian. In fact, in the main folder of Inno Setup, there is the default translator file,
in English, called [Link].

The installer created with Inno Setup has a decidedly professional appearance, as shown in the figures.
following, which show the initial screen of an installation:

Page 3 of 13
Tutorial on INNO SETUP -[Link]

The screens of our Installation

When we launch our setup created with Inno Setup, a series of news and options are displayed.
for the installation, in sequential screens:

Upon launching the setup, it is displayed in a vertical position on the left.


an image, chosen or constructed by us.

On the right side of the image, it is indicated in large characters, the


Welcome message for installation followed by the name of
program to install, and then in smaller characters again the
name of the program including the version and the indication of
closing of any open applications.

The next screen contains a small image in the upper right corner, which will be
maintained throughout the duration of the installation.

In the sliding window through the vertical scroll bar,


the terms of the software license are reported that you
is installing (this screen is optional, it does not appear unless
the description of the terms of the license of use is specified.

If the license terms are not accepted, that is, if the click is not executed
on the 'I accept the license terms' option, the next button
the installation is not activated.

Once you accept the terms of the license, a password request will appear.
to access in order to proceed with the installation.

After entering the password, proceed to the next screen. Also


this screen with the use of the password is optional.

In the window sliding,


through the scrollbar, a message is displayed
of the program's author before the installation takes place
containing various news about the program, or other.
This message (and the related window) is also optional.

Page 4 of 13
Tutorial su INNO SETUP –[Link]

At this point, the actual installation procedure begins.


in fact, the folder (or directory for the Ms lovers) is indicated.
Where to install our program, and the required space by
our program, including all the support files we have
combined with our program.

It is possible to rename the folder or path


typing it directly in the field, or it is possible to select
a new folder, through the browse button.

The folder of the Windows Start menu where to insert is indicated.


the icon through which our program is launched.

Alternatively, through the browse button, it is possible to insert such an icon


in a group of programs.

At this point, you choose whether to add the launch icon of the
our program on the desktop and/or place the same icon
directly on the Windows taskbar, inserting a
check mark on the respective items.

Continuing, information related to the routes is shown


installation of the various files and support folders for our
program

In the window sliding,


through the scrollbar, the last one is displayed
message from the author of
program, the message after
the installation, with various news about
posteriori of the installation.
This message is also
the relative window is optional.

In the end, the completion message is indicated.


of the installation of our program with the execution option
from the same at the end of the installation procedure.

Page 5 of 13
Tutorial on INNO SETUP –[Link]

At the end of the installation, our program keeps the icon set for its creation.
nell’esempio il programma chiamato Codice fiscale possiede l’icona della bandiera italiana.

Once this program is installed, it will present itself as follows:

on the taskbar,

on the desktop.

in the branches of the Start menu


Windows.

It is noteworthy that the final folder, in addition to containing


the program (Italian flag icon),
it also presents a web link that loads the
Web browser
connecting directly to a web page
set up by us.

It also presents the program of


uninstallation of our program.

Page 6 of 13
Tutorial on INNO SETUP –[Link]

Creation of a guided setup (ScripWizard)

Inno Setup allows you to create an installation package for your program through the
guided creation of the package itself, and at the end of the creation, the setup script is generated,
that is, it describes in Inno Setup language how to create the installation package.

Loaded Inno Setup, it is


proposed the screen, in which
it is possible to choose whether to execute the

package through the guide or


go directly to the editor
of the script
We select the choice of the guide
(Script Wizard), and let's skip the
welcome message.

Let's plan the work to simplify the creation of the


installation package (Setup)

The structure of the program


Let's say we want to create an installation package for a program called Tax Code.
the version is number 1.8.

Let's assume again that this program requires an additional file called
[Link], which must necessarily reside in the same folder where the program is located
Tax code.

Furthermore, our program still requires a folder, also placed in the folder where
resides the tax code program, which contains various data files, supporting the program itself and
should be called FilesVari.

Three text messages to display


Let's add a touch of professionalism to our package by displaying the terms of the license.
of the program, a note of information before proceeding with the installation and a note
to visually inform about the end of the installation itself.

So let's prepare 3 text files (ascii format) perhaps written with Notepad to accompany
Windows, and we call them respectively [Link], [Link] and [Link]

Page 7 of 13
Tutorial on INNO SETUP –[Link]

Link to the website


If we have a website to advertise, we note its address to then insert it in the
installation package.

The graphics
Inno Setup manages two default graphic files in BitMap format (BMP extension).

The first chart is the largest, rectangular, measuring 164x314 at 256.


colori (24 bit), [Link],mentre Il secondo file
the graphic is smaller and square called [Link] which measures
55x55 at 256 colors (24 bit).

Alternatively, along with Inno Setup, two other files are provided by
more updated graphic: [Link]-
[Link]
We can still create graphic files while respecting the indicated parameters.
customized for our installation package.

To summarize our application, it has branching.

Folder: FILESVARI Files


vari

CODE
FISCAL

File: PROCEDURE

At this point, let's continue with the screens presented by Inno Setup.

Second screen:

Continuing with Inno Setup we will have the following screen, where we need to specify in the fields:
Application Name
Program Name, which will be displayed in the window of
welcome and will then be reported in the Start menu of
Windows
Application name including version
Full name of the program with its version, and that it will be
displayed only during installation, in the welcome window,
subapplication Name

Page 8 of 13
Tutorial on INNO SETUP -[Link]

Application Publisher (optional)


Name that is entered, after installation, under the icon of the installed program, along with the name
of the program itself

Application Website (optional)


It is the name of the website - A link to the specified site is inserted directly into the folder.
from the installed program, under Start - Programs - <program name>

Third screen:
Application destination base directory
Leave the Program files directory, which automatically creates the folder
where to insert the programs.

Application directory name


Name of the destination folder where to install the program
C:\Program Files\<Application directory name> in our example the
tax code of vbschool.
Leave the default flags, particularly the flag Allow user to change
the app...allows you to change the directory during installation
of installation.

Fourth screen:
Application main executable file
Select the executable program to install (ours
program), through the Browse button
Other application files (optional)
Select each individual file used by the program (wave file,
charts, Database etc) by pressing the button Add file(s) will be
inserted in <Application directory
name>. Or select a
the directory and all its files will be
inserted in <Application directory name> To change the folder of
destination, select it and press the Edit button indicating a
different destination folder, in our example the folder, it
callVariousFiles.

In case any file used by our program needs to


to be placed in some Windows folder (like that of
system), then it is selected, the button is pressed and the Destination base directory is chosen.
install the file.

Page 9 of 13
Tutorial on INNO SETUP –[Link]

Fifth screen:
Application Start Menu Folder Name
It is the name that the branch (containing the program) will take.
called <Application Name> within the Programs menu
Windows Start button. The flags are:
Allow user to change the…
Insert the link to the program in Windows Start.
Allow user to disable Start...
It allows not to insert the link to the program in
Windows Start
Create an Internet shortcut…
Insert the link to the website indicated on the second screen.
Create an uninstall icon in the Start menu folder
Inserts the uninstaller utility of the program being installed
Allow user to create a desktop icon
Add the program icon to be installed on the desktop.
Allow use to create a Quick...
It adds the program icon to be installed also on the Windows taskbar.

Sixth screen:
If you want to select the three text files with the notifications
at installation, you need to select:
License File (optional)
It is the text file with the license terms that must be accepted.
to proceed with the installation. In the example, it is the file
[Link]
File Information file show before installation (optional)
This is the text file with the news to be displayed before starting.
at installation. In the example, it is the file [Link]

File information will be shown after installation (optional)


It is the text file with the news to be displayed after completing the installation. In the example, it is the file
[Link]

Seventh screen:
Select the language in which all messages are indicated during the installation of our
program.

Page 10 of 13
Tutorial on INNO SETUP –[Link]

Eighth screen:

Compiler destination base directory


It is the folder where the setup file of our package will reside
installation, and it will be a single file.

Compiler output base file name


It is the name that will be given to the file containing the package of
installation, residing in the previously mentioned folder.

Custom setup icon –(optional)


It is a file containing a series of icons, from which to choose the icon that
will own the installation package file and requires the compiler definitions.

Setup PasswordIt is the password requested by our package.


installation.

Proceed until the end of the other two screens and finish.
pressing the Finish button.

Inno Setup creates the script language to compile our


installation package, with the included conditions.

This script file can be saved or modified, and then compiled.


subsequently.

Anyway, the message appears: Would you like to compile the new script now? By pressing Yes, it is
the script compilation has been completed and the installation file has been created.

Page 11 of 13
Tutorial on INNO SETUP -[Link]

The generated script file


For brevity, only some modifications to the script file are reported, without commenting on the code.
as for the most part it is easily understandable and in any case for the specifics, please refer to the help in
line of Inno Setup, which is quite detailed.
Script generated by the Inno Setup Script Wizard.
SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Codice fiscale"


#define MyAppVerName "Codice fiscale 1.8"
#define MyAppPublisher "(vbScuola)"
#define MyAppURL "[Link]"
#define MyAppExeName "[Link]"
#define MyAppUrlName "[Link]"

[Setup]
AppName={#MyAppName}
AppVerName={#MyAppVerName}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\Tax code of vbSchool
DefaultGroupName={#MyAppName}
LicenseFile=H:\Prg\[Link]
InfoBeforeFile=H:\Prg\[Link]
InfoAfterFile=H:\Prg\[Link]
OutputDir=e:\compilazione
OutputBaseFilename=SetupCodFisc
Password=chicca
Compression=lzma
SolidCompression=yes

In the setup section, we can add the two lines of code that load the charts, without using
those by default
WizardImageFile=C:\Documenti\[Link]
WizardSmallImageFile=C:\Documenti\[Link]

[Languages]
Name: "italian"; MessagesFile: "compiler:Languages\[Link]"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription:
"{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription:
{cm:AdditionalIcons}; Flags: unchecked

[Files]
Source: "H:\Prg\[Link]"; DestDir: "{app}"; Flags: ignoreversion
Source: "H:\Prg\[Link]"; DestDir: "{app}"; Flags: ignoreversion
Source: "H:\Prg\Support\*"; DestDir: "{app}\FilesVari"; Flags: ignoreversion recursesubdirs
create all subdirectories
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

Page 12 of 13
Tutorial on INNO SETUP -[Link]

In this section, having to insert a DLL into the System directory and register it is:
Source: E:\[Link]; DestDir: {sys}; CopyMode: alwaysskipifsameorolder; Flags:
restartreplace sharedfile regserver
while for an OCX or DLL in the System directory without its registration:
Source: E:\[Link]; DestDir: {sys}; Flags: ConfirmOverWrite

[INI]
Filename: "{app}\{#MyAppUrlName}"; Section: "InternetShortcut"; Key: "URL"; String:
{#MyAppURL}

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{app}\{#MyAppUrlName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename:
{app}\{#MyAppExeName} ; Tasks: quicklaunchicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#MyAppName}}"; Flags:
nowait postinstall skipifsilent

UninstallDelete
Type: files; Name: "{app}\{#MyAppUrlName}"

To create a very detailed script, you can use a freeware program downloadable from the internet.
which allows you to set the application package in its multiple parts.

The program in question is ScriptMaker, which through various screens and settings, is able to
generate a very efficient script to create our installation packages. It can be downloaded.
to the address[Link] link of which can also be found on the Jordan Russell website

Another program, easier to use, is ISTool, also freeware, very similar to ScriptMaker.
it can be retrieved at the [Link]

To find the solution to the requirements set for your installation packages, visit the
countless forums online.

Page 13 of 13

You might also like