NSIS Installer vs. Advanced Installer: From Scripts to GUIs in Application Packaging

Written by Alex Marin · February 8th, 2024 · 6min read

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 creators of Winamp, NSIS has evolved into a versatile and widely adopted installation system.

Its scripting engine and a vast collection of plugins have made it a favored 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 offer a seamless and user-friendly installation experience.

In this article, we'll put NSIS and Advanced Installer side by side to see how each handles package creation.

Getting Started with NSIS Installation Packages

To kick off, 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’s important to understand that NSIS provides 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.

7-Zip file compression

Once the ZIP file has been created, we can start NSIS from the Start Menu and click on “Installer based on .ZIP file”.

NSIS Installer Menu

A new window appears to select the previously created ZIP file. Then, NSIS automatically reads its contents and provides basic information inputs such as the installer name, interface type during installation, installation folder, and the output directory for the EXE file. After everything is configured, you can press the Generate button, and the EXE file is built.

Zip2Exe Convertor

NSI Scripts: The Core Components

NSI files, also known as NSIS Script files, are text-based script files used with the Nullsoft Scriptable Install 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 control how software installers look and work. This includes everything from how the installer looks, to what files get installed, to how the software can be removed, and more.
  • NSI files provide a high level of customization for installers. Developers can define how the installer window looks, add license agreements, create custom pages for user input, 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 the main 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 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 need to 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 for the software installation.

Keep up with the latest in 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 offers valuable insights to keep you ahead in the rapidly changing field of software packaging and deployment.

Subscribe to Our Blog

Here's 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 in your application folder and renaming it with the .NSI extension. After that, open it in Notepad or your text editor of choice and add the desired lines to configure your installation package further.

NSI text file

Once the NSI file is created, open NSIS and choose “Compile NSI Scripts”. A new window appears where you have to open the NSI file.

NSIS Build

Exploring Advanced Installer: Easy GUI-Oriented Application Packaging Tool

Advanced Installer offers a robust, user-friendly GUI that significantly reduces the time you would spend on documentation.

Supporting multiple installation formats like MSI, EXE, MSIX, APPX, and APP-V, Advanced Installer streamlines the import and conversion of NSIS Scripts into various installation types.

Let's replicate an NSIS project in Advanced Installer and configure it to generate an MSI output.

1. Open Advanced Installer and on the Start Page, navigate to “Import” and choose “NSIS Script”.

Advanced Installer NSIS import

2. Once the project is set up, input the product details as we did with NSIS.

Advanced Installer product details

That is it! Advanced Installer automatically added the required files in the “Files and Folder” page, including the shortcut we previously created within the NSI script.

Additionally, if you're thinking of switching to Advanced Installer, you wouldn't need to go through all the manual steps we did with NSIS. Everything can be handled through Advanced Installer's powerful graphical user interface.

Conclusion

In summarizing, the comparison between NSIS (Nullsoft Scriptable Install System) and Advanced Installer, it's clear that each tool offers distinct features and benefits tailored to different developer needs.

While NSIS has been a valuable tool in the realm of installer creation, Advanced Installer offers a compelling alternative. Its intuitive GUI, diverse output formats, script conversion capabilities, extensive feature set, and validation of best practices make it the superior choice for developers and software creators. These features are designed to streamline the installation process, enhance user experiences, and ensure the successful deployment of applications

NoteDive into the full capabilities of Advanced Installer with our 30-day full-featured trial. Experience firsthand how our intuitive GUI, versatile output formats, and comprehensive script conversion capabilities can streamline your software deployment process.
Start Your 30-Day Full-featured Free Trial

Written by
See author's page
Alex Marin

Application Packaging and SCCM Deployments specialist, solutions finder, Technical Writer at Advanced Installer.

Comments: