Research-Project-Installer

This is a research project about Installers in Windows. A guide for the folders can be found in the "docs" folder. For more information please check out all the information give in the web page and the GitHub repository. (DISCLAIMER! This information is relevant as of may 2020)

View the Project on GitHub Needlesslord/Research-Project-Installer

Personal Research: Installer

This web page and the GitHub repository where it is created from are dedicated to what an Installer is and how to create one for your software in Windows using xml integration and NSIS Installer extension to work wih, with small steps and a solution provided. For further information, a bibliography is provided below.

Pro tip! If you do not understand a term or need further help with this documentation, please use IT Dictionary pages such as Computer Hope or Stack Overflow or contact me directly at needlesslord@gmail.com.

A guide for the folders can be found in the “docs” folder.

DISCLAIMER! This information is relevant as of may 2020


Who am I?

I am Núria Lamonja i Pujol (GitHub username Needlesslord, e-mail needlesslord@gmail.com), student of the Bachelor’s Degree in Video Games by UPC at CITM-TTC. This content is generated for the second year’s subject Project 2, under supervision of lecturer Ramon Santamaria, tech developer and lead of raylib technologies and emegeme.


What is included in this research?


What is an Installer?

An Installer, Installation Package or Application Packaging is used to install software programs on a system. They simplify the process of installing software by providing the user with a step-by-step process with options to select from which will best suit individual needs. The installation process for software depends on your OS (operation system) and the program you are installing.

You may have seen them as executable (they can come in different formats, usually depending on the device) files you open to install games, different softwares and others, with detailed instructions that you usually skip with the “Next” button. This executable (sotfware which is a file used by a service) is created to install an application onto an specified device contain the files, registry and logic. They involve the preparation of standard, structured software installations targeted for automated deployment and should be prepared for both commercial software and home-made apps.

They usually contain more than only the .exe (executable file). For example, they often contain multiple files in different locations, shortcuts, registry, runtime engines, .NET registration, shell integration, ActiveX controls, databases, and more! As said before, they can also come in different formats, such as Setup.MSI (Microsoft Windows Installer); Setup.exe (Legacy executables); .APPX (Windows store, introduced with Windows 8); Install.vbs, Install.ps1 or Install. bat (Batch or script files), Loose/Raw Files or .dll, .xla, .xlam, .ppam, .dotm, etc. (add-ins or plug-ins), and more!

What are Installers used for?

Installers can be used to install games on end-user machines. They usually offer full support for a customized user interface, as well as patching.

Application management costs can be a problem for many corporate networks due to the expense of the maintenance of desktop and notebook systems. Therefore, new application management techniques are being developed to help enterprises administer their existing PC investments more efficiently. One of them is application packaging, which helps business manage growing volumes of software for desktop and server systems. Therefore, Installers are used to avoid them.

What should you know before installing a software?

What is the real purpose of Installers?

After all of this, application packages may be a very generic concept to you or you don’t fully know why you should use it. Of course, Installers were first created to solve arising problems, and in this section I will talk about the concrete purposes and benefits sought.

What is Deployment?

First of all, we need to understand what Automated Builds are. In a short and easy way, it is the process of automating the creation of a software build and the associated processes. This means that, with no human interaction, the code will create releases of our software, like different “launches”, mainly to have a contingency plan. Imagine you are working on your code, but you made a mistake and it doesn’t work anymore; you could go back to a previous version, created automatically, in order to continue working. There are many programs which can do that for you.

Automated build can be divided in two main parts: deployment and continuous iteration. However, we are just going to talk about deployment in this research.

Diving into deployment, it is a very simple concept: it is all of the activities that make a software system available for use. The general deployment process consists of several interrelated activities with possible transitions between them. Something to take into account is that, since it involves both the producer and the consumer, it has to be customized according to specific requirements or characteristics.

In short, software deployment includes all the process required for preparing a software application to run and operate in a specific environment. It can bring many advantages, such as it being time saving, enhancing security, enabling to monitoring of user actions, effectiveness in software updates, and more. For more about its advantages, check out the following link.

What should you know about Deployment?

The following part is particular to MSI Tools, which will be introduced below.

The tasks and features included in a setup are very different and they can range from very basic, such as third party tool support, to highly customized tasks. MSI has “custom actions”, where you can actually code yourself to deal with unique deployment requirements. In this section, however, I’m only going to be talking about the first one, since custom actions can be used to improve and go beyond in your Installer.

The set up basics are fundamental to your Installation Package. All third party tools provide good support for there setup fundamentals, but there are some differences. The installation of prerequisites may be the area where third party tools and free frameworks different the most in terms of ease of use. However, there are some fundamentals that all setups must have built-in.

Why is Deployment important for the Installer?

As said before, deployment is a simple concept, but it has some things we must take into account, since it can cause errors in the long run. Therefore, I will introduce the most common and important problems that can be generated by the deployment of software applications.

Then, even if it can create problems for our source code and the list of requirements is always growing, is it worth? The answer, of course, is yes. It is actually key for Installation Packages, since it can allow for example, unattended setup, meaning that, taking into account that some installs are tougher than others, it can help you distribute such packages to your computer by recording the changes in your system after it is installed and then these changes are deployed to other computers on your network automatically, so you don’t have to do it. To summarize, it only make the life of developers easier, since it simplifies your work, automates the code and the releases and it can prevent errors in the code.

For more information about Deployment, please take a look at the research my colleague Daniel Ruiz did on Automated Builds or Pol Galan did as well on the same topic Automated Builds CI/CD.


Have you seen it in games?

Installation Packages are used broadly, as said before. From programs to games to other type of software. However, in this section, I will show you where you may have seen it in games and how they made your life easier. Mostly, since users are familiar with this way of installing games and also make it really simple, fast and easy all (or almost all) games use Installers.

Disclaimer! Please note that these pictures are from different years, so the design or usage may be different now.

Game shops

For example, in Game shops, when you want to use the app instead of the web, you are asked to install them to your computer through an Installation Package. Epic Games and Steam are used as examples below.

Here you can see two different pictures of the Epic Games Launcher Setup, which in this case, since it was in a Windows OS uses MSI. In both of them they are asking for a “Destination Folder” or “directory”. This means they installer is asking for a folder where you want to save all the files needed to run the game and possible future downloads.

Epic-Games-Installer-Directory

Epic-Games-Installer-Directory-2

Here you can see how the Epic Games Launcher Setup is installing all the needed files in your computer.

Epic-Games-Installer-Launcher

Here you can see how to uninstall a game directly from the Epic Games Store, step by step.

Epic-Games-Uninstall-Game

The following picture is from Steam’s Installer. It shows the License agreement, which you have to accept in order to press “Next”.

Steam-License-Agreement

The following two pictures are from installing a game from Steam on a Mac OS (Apple). The first one shows how the end-user can choose whether to create or not shortcuts and the second one is the message Steam displays once you have already installed your product.

Steam-Game-Install-Shortcuts

Steam-Game-Install-Finish

Games

In games, for example, you always see them. The following images display different installers for individual games, which are not installed from Game Shops.

Here we can see what is first shown to the user when installing LOL (League of Legends).

Install-League-of-Legends

Mods

Of course, Mods for different games also require and almost always use installers. The following picture is for an installation of a Vehicle Mod Pack for the game GTA IV (Grand Theft Auto IV).

Install-Mods-GTAIV


What is the approach to this problem in this research?

This research in particular will be used in an RTS game developed for the same subject, Project 2 taught at CITM-TTC (UPC). The OS (operating system) used to develop it is Windows (in particular, Windows 10 and 8), therefore, we are going to use MSI (Microsoft Windows Installer).

What is MSI (Microsoft Windows Installer)?

MSI, also known as Microsoft Software Installer or nowaadays as Windows Installer, is an installer package file format used by Windows. MSI files are used for installation, storage and removal of programs. It was developed by Microsoft and it is used for the OS of Microsoft Windows, under the Freeware License.

MSI files are database files, used by Windows Installer. They contain information about an application which is divided into features and components, and every component may hold files, registry data, shortcuts, etc. It also contains the UI that is to be used for installing, and various other data such as any prerequisites to look for, custom actions to execute, the order of the installation procedure, whether to support Administrative installations, etc. It can also contain the actual files to be installed themselves, but this isn’t always the case. MSI files are executed by an EXE file that is part of Windows, called MSIEXEC.EXE. This application reads the data in the MSI file and executes the installation.

MSI files are the current recommended way of doing installations on Windows. The alternative is writing a program that performs the installation itself.

Why am I using MSI?

In my particular case, I had to choose with limited options in mind. My small scope of project which is only for a research for my university’s degree with no revenue from it made me move towards free software. In addition my computer and my university’s computers run on Windows OS and I had to choose a reliable software to work on it. MSI fulfills all the requisites.

Nevertheless, these are in my particular case, to know what I was looking for. Windows Installer has many built-in functions that will save you time and effort, and here you have a list to show you why I went with it:

How does the MSI Application Management work?

The Windows Installer service was designed to support every phase of the application management life cycle, providing a service to support each step involved in managing a desktop application from deployment through retirement.

To support these functions, the Windows Installer needs to receive instructions from an installation package.

MSI-cycle_life

What files and components are included in the MSI?

Previously, installation packages were always setup.exe files. However, due to inconsistencies in the way independent software vendors and internal software development groups created these installation files, sometimes complications came up when administrators attempted to manage automated installations. Therefore, the emerging standard is for Windows Installer to use the msiexec.exe program to process the installation packages at an end user’s PC. The packages follow a standardized database structure containing the information that Windows Installer requires to install or uninstall an application and to run the user interface for the setup. In overall, The Windows Installer technology is divided into two parts that work in combination; these include a client-side installer service (Msiexec.exe) and a Microsoft Software Installation (MSI) package file. Windows Installer uses information contained in a package file to install the program.

Note the following extensions:

What does MSI support?

Windows Installer can support many applications installed, from a network share (referred to as an administrative installation), to a locally on an end user’s PC. The downside to using a network share can be that systems receive patches or repairs only when they are connected to the network, which may be a consideration for organizations supporting many notebook users.

How do you sign an Application Packaging?

First of all, it is important to understand what digital signature means. Basically, a digital signature is a mathematical scheme based on algorithms to verify the authenticity of digital messages or documents. They are a standard element of the most cryptographic protocol suits and widely used for software distribution, as well as in other fields, such as financial transactions or contract management software, and it is key to detect forgery or tampering.

Signing an application package provides the user with verification that the application data has not been modified after being signed, while confirming the identity of the user or the company that signed it. Therefore, signing an Installer is an important thing since you help ensure that tampered files are not installed on end-user computers.

There are many methods and ways to approach this topic, but since we are using .msi files for the deployment of applications, I chose SignTool.exe, which is a command line tool that is used to sign an Application Package or a batch of applications with a certificate. This tool is installed in the Bin folder of the Microsoft Windows Software Development Kit installation path. Therefore, we need Microsoft Windows SDK to be able to work with SingTool.exe, which you can download here. Here you will find how to install SignTool.exe for Windows 10. Here you will find a link to learn how to install SignTool.exe for Visual Studio 2017.

The steps are easy:

Here you have a tutorial on “How to Sign an Executable File using Signtool In Windows” by GlobalSign in Youtube.

How can you test an Application in a Virtual Machine?
What is a Virtual Machine?

Before explaining how to test an application in a Virtual Machine, it is important to understand the concept and what it is. Basically, a Virtual Machine (VS) is an emulation of a computer system. They are based on computer architectures and provide the same functionality of a physical computer.

There are different kinds fo virtual machines, each one with different functions:

The main purpose of VM is to test software in the safest way. Testing in VM allows to simulate a full operating system, isolated from the rest of our machine, and it’s the perfect way to test our setup installer to check whether it works or not in different OS and their previous versions.

What is VirtualBox?

There are several tools that you can use to create VM. In my research, however, I’m going to use VirtualBox, but bear in mind that there are many other and some may be more suitable for you project, depending on the scope, knowledge, etc.

Oracle VM VirtualBox is a free and open-source compatible with Windows, macOS, Linux, Solaris and OpenSolaris. Basically it supports the creation and management of guest virtual machines. It is aimed both for enterprises and home use. Bear in mind that VirtualBox is being actively developed with frequent releases and a growing list of features.

In the following link you can go to the official web page of VirtualBox. In the following link you can see the license (GNU General Public License (GPL)). In the following link you can see the documentation.

How do you work with VirtualBox?

How to install VirutalBox

The welcome page will be first shown. Press “Next”.

1

Here you can choose, what install or not to install. Press “Next”.

2

Here you can choose how to install said features. Press “Next”.

3

Now you have a warning. Press “Yes”.

4

Here is to start installing. Press “Install”.

5

You will be shown a progress bar. In my case, the download was quick.

6

Windows may ask if you trust the software. Press “Yes”.

7

Before installing VirtualBox, please be sure that you install the proper platform package according to your current OS. Here you have the link to the download page of VirtualBox.

And you are done!

8

Obviously, once we have installed VirtualBox we cannot start testing right away. First, it is necessary to create a secluded place where your software will be alone to test it.

For a more visual representation, here you can find a video by TechGumbo on How to Use VirtualBox (Beginners Guide).

Screenshots on how to create a new Virtual Machine in your computer step by step:

A B C D E F G H I J K L M N O P Q R

What is NSIS?

NSIS stands for Nullsoft Scriptable Install System. It is a professional open source system to create Windows installers. It Here you can read the license.

DISCLAIMER! I decided to use NSIS due to the features it has to offer, but please note that there are a lot of other Installation softwares, such as WiX Toolset or Inno Setup which can be more suitable for you. Some of them are mentioned in sections below with tutorials so you can also learn about them

What are the features of NSIS?

NSIS is small and flexible, which makes it very suitable for internet distribution. It also has many plug-ins and scripts available to create web installers, communicate with Windows and other software components, install or update components, its custom dialogs and interfaces, multiple languages available, support for web installation and file patching, project integration and different releases and automatic builds, its portable compiler, it’s easy and understandable design, and more.

The most important aspects you have to remember of NSIS are:

To see the full features of NSIS, here you have a link to the section dedicated to them from NSIS’ web page.

How do you install NSIS?

The following images will show you all the steps to install NSIS. In addition, I will show you how to install a package to help you with the creation of scripts for NSIS.

Installing NSIS

First of all, you have to go to the download page, you have the link here. In this case, we are downloading the version NSIS 3.05, released December 15th 2019. Here you have the release notes. You just have to click “Download” in bold letters under the release date and version.

1

Once downloaded it, you just have to click the downloaded file, called “nsis-3.05-setup.exe”. You will find this file in the “Downloads” directory unless you have specifically changed the directory path or saved it elsewhere. Double click on it and the NSIS installer will start running. You will see this. Press “Next”.

2

Next you will be shown the License Agreement. Press “I agree”. It is advisable to read it thoroughly.

3

Now you will need to choose what components to install. Since one of NSIS’ main features is how light it is, you can install them all without worrying about taking up too much space. Therefore, it is advisable to leave the predefined option “Full” in the “Select the type of install”. It will only require 7MB. Press “Next”.

4

Then, you will have to choose the Install location. It is also advisable to leave the destination folder as it is, but you can change it if you want to. Press “Install”.

5

It will show the following, with a bar loading to show how the install is going. It will take no time due to its size. Press “Next” once the install has finished.

6

Your software is ready to use! Now you can choose whether you want directly to run NSIS and/or show the release notes. It is advisable to only “Run NSIS” and to untick the other box, this way you can test if NSIS is working well. Press “Finish”.

7

Once you run it this will be shown to you.

8a

In addition, this is what it will show you if you had chosen to see the release notes. However, you can find them in the web page too.

8b

To uninstall NSIS, you must double click again the executable called “nsis-3.05-setup.exe”. The first you will be shown will be the same as when installing, however, at some point you will be asked “Uninstall NSIS” or “Add/Reinstall components”. Choose “Uninstall NSIS”. After that you need to choose the location where all the files related NSIS are and then click “Uninstall”. A progress bar will be shown and after choosing to “Close”, NSIS will no longer be in your computer. The following images will show you the process.

A B C D E

Installing/Start using NSIS Quick Setup Script Generator

In order to do the TODOS and learn how to create scripts to create installers, we will help ourselves with NSIS Quick Setup Script Generator.

First of all, you have to download the .zip from the following web page. There is a link provided to download the package. It can be found in “Links”->”Download”, in the line that says “NSIS Quick Setup Script Generator Nsisqssg.zip (74 KB) the current release.”.

1

Once downloaded it, you just have to click the downloaded file, called “Nsisqssg.zip”. You will find this file in the “Downloads” directory unless you have specifically changed the directory path or saved it elsewhere. We want to unzip the file, so you will have to right-click the file and select “Extract in Nsisqssg". This will create a folder where all the scripts will be saved, both in .nsi format, .ini and .txt. If you go inside this folder, you will find an executable called “NSIS Quick Setup Script Generator.exe”. Double click it to start running. Press “Next”.

2

After that, the app will start showing you commands, but I will talk about them later, since from this point onwards you are already creating a script. The steps to create said script will be found below in the exercise.


Can it be improved?

There is a lot of room to improve your installers using NSIS. Since you can create your own scripts and produce all the content you need for your own Installer. In addition, some basic scripts can be used, and always come with NSIS when installing.

Custom actions

When there is no built-in support for a certain operation or task in Windows Installer itself, or in any of the various third party tools available, you are left having to implement the feature yourself.

When you use Windows Installer, this involves running custom actions of various types (Windows Installer’s mechanism for running executable, custom installation logic during installation).

Custom actions are purpose built executables (binaries: dll, exe) and scripts capable of making advanced modifications to the system during installation that are not supported by Windows installer natively or by the deployment tool in use (WiX, Installshield, Advanced Installer, etc…).

There are different custom action types: implemented as scripts (JavaScript, VBScript), .NET binaries (C#, VB.NET, DTF,…), PowerShell scripts, etc.

Custom actions that make modifications to the system run with elevated rights so that changes can be made to the system even if the logged on user does not have admin rights. There is essentially no limit to what these custom actions can do. They are armed and dangerous.

Custom actions are the leading causes of deployment errors and failure.


How can YOU do it?

What will the TODOs (exercises) teach you TODO?

To start with your Installer, as obvious as it may be, you have to install the software first. Above this section you can find how to install NSIS, the program I will be teaching you how to use in order to create an Installer for your game, software and others.

What do you have TODO?

Pro tip! If you are using Visual Studio, you can press Ctr+Shift+F and look for “TODO” in all your code. This way you will find the exercises in the code easier

Disclaimer! You can find the solutions below.

TODO0-1: Create an installer from a .zip file

After opening NSI, you are shown different “links” that will take you to different parts of NSIS depending on what you need to do for your Installer. You will have to choose the option from the “Compiler” you believe will lead you to create an executable from a .zip file. Once there, you will need to choose from which .zip you want to take the files of your software, the name of the installer and the default folder. Then, choose “LZMA” and generate your file. You have it!

TODO0-2: Learn the NSI language

Here you have a summary of .nsi language.

Here you can find a link to a script with basic syntax errors in this language. Find them all so that it works.

TODO0: Icon game

You will need an icon (.ico). It is advisable it is inside your game’s assets folder.

You need to add an icon to your game. Look at all the types of files you can add and see if you can find something to add this resource. Then import your icon.

TODO1: Using NSIS Quick Setup Script Generator to create a basic script

As said before, we will use this software provided by NSIS to create a basic script. Open the executable and play with it. The interface is very intuitive. After completing all of the fields, you will have your first script in NSIS. Of course, you may not understand some part or if you can leave a field blank, etc, so an explanation on how to use this software can be found in the solutions below.

TODO2: Icon Menu

You will need a bitmap (.bmp).

In this TODO I will remind you of some .nsi syntax. You will have to add a .nsh for the MUI to control the interface (UI Dialog). In this case, you have to add a “header image” to personalize your interface. You will have to use “!define” and you must do it under the !include “MUI.nsh”. Bear in mind the localization of your script, since in the previous step you chose a directory to both save the .nsi file and a directory where your installer will take the files from.

TODO3: Icon executable

You will need an icon (.ico). (If it complains about your icons check this information)

In this TODO You will have to add a .nsh for the MUI to control the interface (UI Dialog). In this case, you have to add an “executable image” to personalize your setup software. In this case you will have to “!define” an icon. Bear in mind the localization of your script, since in the previous step you chose a directory to both save the .nsi file and a directory where your installer will take the files from.

How is it done?

TODO0-1

Here are all the screenshots on how to do it. First you need to select “Installer based on .ZIP file” under the “Compiler” section. A new window will be opened. You will need to look for the .zip in “Open…”, which will let you browse in your computer. You can then change your installer name and choose the interface design (I left it at “Modern” since it’s what we will be using) and then select the “Output EXE File”, which if you click “Browse…” you can look for it and select it in your computer. I recommend you to leave LZMA in “Compression” since it’s the most efficient out of all of them. Press “Generate”. You now have your installer, which should look like the last picture.

See the screenshots:

1 2 3 4 5

If you need more help, here you have a Youtube video Tutorial by Ivan Angelkoski that may help.

TODO0-2

Here you can find the script without errors and small explanations. Remember that “;” is used to comment, so the explanations will be after them.

TODO0

First you need to open Visual Studio. In a folder of your choice (choose wisely), you will be adding your icon. In my case I chose the “tools” folder. Right-click the folder, choose “Add” and then “New element”. Go to “resources” on the left and add a ,rc file, you can change the name. Press “Add”. Then right-click again and choose “Add resource”. Select “Icon” and “Import”. Browse in your computer the .ico you wish to be the icon for your game. Now you just have to run the code! Bear in mind that, if you run it in “Debug”, it will only change the icon in the Debug’s executable. It will happen the same with “Release”.

Here you have the screenshots of every step:

todo4A todo4B todo4C todo4D todo4E

TODO1

Here there is an explanation on how to use Quick Setup Script Generator.

AS stated beforehand, to use this software you just need the executable. Once done, all your scripts will be saved into the same folder, but I’ll get to that later. Open the executable and Press “Next”.

A

Here is where you will start creating your script with the help of your software. In this section you are asked for a “New project name”. You can also “Load a previously saved project”, but since we are creating a script from scratch we will not use that feature. Here you can write down the name of your game, in my case Test_Game_Pong. The following two images are used as a how it is first shown and what I have written for the example used in this research. Press “Next”.

B1 B2

Now, you have to put a lot more information about your software. You will need to write in each field You game name, who developed it, under which license, the version it is done for, etc. There are some fields you don’t have to fill, like the license one. I recommend you choose in the compression type LZMA, since it’s top one at the moment. To add a License, you will need it in .txt format; you just have to press the the button next to it (it has “…”) and browse in your computer to add it. I also recommend you to choose “Install for all users”. You can see how I filled out the information and what is shown before changing anything. Press “Next”.

C1 C2

In the next step, you are going to basically select what’s going inside the end-user. You will need to look for the executable first. In the “Main exe” section, you need to press the button “…” and browse through your computer for the game’s executable. Then, in “Add files”, you will need to add what the game or software needs to run. In our particular case, in the Pong game provided, there is a folder called “Game”, with 2 different folders. You need to browse clicking “…” and add “Game”. Then, next to the “…” button, you have to tick “Include subdirectories” in order to also add all the files which are in other folders inside “Game”, the main folder. You don’t need “Additional Installation Files” in this case, but you can do it in this section too. Press “Next”.

D1 D2

Before generating the script, you will need to say how you want the Start Menu and set the compiler preferences. In this case, I chose to tick to “Create a desktop shortcut as well”, to add a shortcut of the game in the end-user computer’s desktop. This is what’s most important about this section with the compiler preferences. For the other ticks, I chose to also tick them in order to give the end-user more options, but it will depend on your needs, which may not be the same as mine. In the “Compiler Preferences” section you will be choosing where to save your Installer and its name, which you don’t need to touch at all and it will be automatically set to “setup.exe” in the folder you first opened NSIS-QSSG. It’s important to tick “Save compiled script for further editing”, since we will be adding things in the following TODOs. I also chose to “Also open up saved script in editor” to continue working. Press “Generate”. You will be asked “Do you want to save/update the current project settings?”, say “YES”.

E1 E2 E3

Shortly after, the script will start generating and a pop-up will say it is “Done!”. Press “Accept”. Then Press “Close”.

F G

Here you have your script!

H

As said, everything will be saved in the NSI-QSSG folder in your computer. The following files will be generated (the name is for the game and code I provided):

If you want to edit your file again with NSIS-QSSG you will need to open the .ini file. To continue working to add your own code, you will need the .nsi file.

THIS IS HOW YOUR INSTALLER SHOULD LOOK NOW

1 2 3 4

TODO2

Here, as said before, you have to add an image to the heather. You must add it after “MUI.nsh” is added, since what we need is inside it.

todo2a

We will add it just after “MUI.nsh” to avoid conflicts. You will need to define !define your variable/function. This first line is to initialize, the second one is asking for a bitmap (.bmp) and the third one is for the position. In our case, we have the image in the same folder as the file and “Game” foder, so there’s no need to write the directory. If you need to, “FolderName/Image.bmp” is how to do it.

todo2

TODO3

To add an icon to your installer we are also using MUI, therefore, it will be written just below the previous TODO. It works in the same way the Bitmap image for the heather (TODO2, second line), you are defining and icon, so you have to add “Icon.ico” and in case it’s not in the same folder, you will need to add the path.

todo3

THIS IS HOW YOUR INSTALLER SHOULD LOOK NOW

1 2 3 4 5

This last picture shows the files I have in my folder at the moment.

Pro tip! After all the TODOs, to create your working Installer, you need to open NSIS and choose the option below “Compiler” called “Compile NSI scripts”. This will open a new window. In “File” you have choose “Load script” and choose the .nsi file you want to create your installer from. It will run automatically: red if your code doesn’t compiler, orange if there are warning and green if neither of those. Your installer will be generated automatically and you can Press “Test Installer” to see how it works.

Where can you find the exercise?

Here you can find the link to the exercise

Here you can find the final result

Here you can find the solution


How can you continue improving?

If you want to Import a root certificate, you can go to the following link where it is explained how to do so silently.

To continue learning about installers, I propose that you do those exercises on these other installers, which are WiX Toolset and Inno Setup.


Here are the links and references where I got all the information I used to create this research.

Some of the images were taken from Google Images. All the screenshots for the tutorials were done by me. Credit goes to their respective authors.


Further information

About Automated Builds:

About other tools to create a Windows Installer Package:

About Deployment and Automated Builds: - Automated Builds - Automated Builds CI/CD - Pdf Element: Best 5 Software Deployment Tools for Enterprise