NSIS (Nullsoft Scriptable Install System) is an open source tool that enables developers to create efficient and customizable Windows installers. Originally developed by Nullsoft, the makers of Winamp, NSIS has evolved into a versatile and widely adopted installation system.
Its scripting engine and a large collection of plugins have made it a preferred choice for software deployment, thanks to its simplicity, flexibility and speed. With NSIS, developers can create installation packages that are not only easy to distribute, but also provide a seamless and user-friendly installation experience.
In this article, we will decide NSIS AND Advanced installer side-by-side to see how each handles package creation.
Getting started with the NSIS installation packages
To begin, we’ll delve into creating a basic installation package using NSIS, focusing on the ZIP option.
After downloading and installing NSIS from the official website, it is important to understand that NSIS offers two options for creating installers, with the ZIP option being one of the simplest.
Let’s assume we have an application with its executable and additional files located in a folder. All we have to do is select all the files and compress them into a ZIP file. For this operation, you can use any archive manager out there, such as 7-Zip.
Once the ZIP file is created, we can launch NSIS from the Start menu and click on “Installer based on .ZIP file“.
A new window appears to select the previously created ZIP file. NSIS then automatically reads its contents and provides basic information such as the name of the installer, the type of interface during installation, the installation folder, and the output directory for the EXE file. After everything is configured, you can press the button Generate button, and the EXE file is built.
NSI Scripts: Main Components
NSI files, also known as NSIS Script files, are text-based script files used with the Nullsoft Scriptable Installation System (NSIS). NSI files contain instructions and configurations for creating custom installation packages.
Here are some key aspects of NSI files:
- NSI files are simple text files that you can create or edit with something as basic as Notepad. They have their own specific syntax and structure.
- They use a special scripting language from NSIS to check how software installers look and work. This includes everything from what the installer looks like, what files are installed, how the software can be removed, and more.
- NSI files provide a high level of customization for installers. Developers can define what the installer window looks like, add license agreements, create custom user login pages, specify installation paths, and configure post-installation actions.
- NSI files are organized into sections. Each section represents a logical unit of the installation process, such as core program files, optional components, or third-party libraries. Sections allow developers to control which files are installed based on user selections.
- NSI files can use variables to store and manipulate data. These variables can be used to set installation paths, customize messages, and control the flow of the installation process.
- NSI files often include preprocessor directives is processed before the script is compiled. These directives can define constants, include external files, or conditionally include or exclude sections of the script based on compile-time conditions.
- NSI files must be compiled into executable installer files (usually with the “.exe” extension) using the NSIS compiler (makensis.exe). The resulting installer file contains all the instructions and resources needed to install the software.
Keep up with the latest application packaging tools, trends and best practices by subscribing to our blog.
Whether you’re an experienced developer or new to software creation, our blog provides valuable insight to keep you ahead of the curve in the rapidly changing field of software packaging and deployment.
Subscribe to our blog
Here is a simple example of an NSI file:
; Name of the installer file OutFile "MyInstaller.exe" ; Default section Section ; Output path for installation SetOutPath "$INSTDIR" ; Add files for the main program File "AppFinder.exe" File "delete-file-all-users.ps1" File "delete-registry-all-users.ps1" ; Create Start Menu shortcut CreateShortcut "$SMPROGRAMS\My Program.lnk" "$INSTDIR\AppFinder.exe" SectionEnd
In this example, the NSI file defines a basic installer that installs a program (“AppFinder.exe”) and creates a Start menu shortcut. The “OutFile” directive specifies the name of the installer executable.
You can create this file by adding a new text document to your application folder and renaming it with .NSI extension. After that, open it in Notepad or the text editor of your choice and add the desired lines to further configure your installation package.
Once the NSI file is created, open NSIS and select “Compile the NSI scripts“. A new window appears where you need to open the NSI file.
Exploring Advanced Installer: Easy GUI-oriented application packaging tool
The advanced installer offers a robust and user-friendly GUI that significantly reduces the time you would spend on documentation.
Supporting multiple installation formats such as MSI, EXE, MSIX, APPX and APP-V, the Advanced Installer simplifies importing and converting NSIS Scripts to various installation types.
Let’s replicate an NSIS project in the Advanced Installer and configure it to generate an MSI output.
1. Open the Advanced Installer and on the Home Page, navigate to “imports“and choose”NSIS script“.
2. Once the project is set up, enter the product details as we did with NSIS.
This is her! The advanced installer automatically added the required files to the “Files and Folders” page, including the shortcut we created earlier within the NSI script.
Additionally, if you’re thinking of switching to the Advanced Installer, you won’t have to go through all the manual steps we did with NSIS. Everything can be handled through the powerful graphical user interface of the Advanced Installer.
CONCLUSION
In summary, comparing NSIS (Nullsoft Scriptable Install System) and Advanced Installer, it is clear that each tool offers special features and benefits tailored to the different needs of developers.
While NSIS has been a valuable tool in the realm of installer creation, Advanced Installer offers a compelling alternative. Its intuitive GUI, various output formats, script conversion capabilities, extensive feature set, and best practice validation make it the best choice for software developers and creators. These features are designed to simplify the installation process, improve user experiences, and ensure successful application deployment.
Dive into the full capabilities of the Advanced Installer with our full-featured 30-day trial. Experience firsthand how our intuitive GUI, versatile output formats, and comprehensive script conversion capabilities can simplify your software deployment process.
Start your free 30-day trial with full features