Tool:Nullsoft Scriptable Install System
| Developer | Nullsoft (2000-2001), then the NSIS team (Amir Szekely and contributors) |
|---|---|
| Platforms | makensis: Windows, Linux, macOS (POSIX build); installers: Windows x86, amd64, arm64 |
| Versions | 1.x (2001), 2.0 (2004) - 2.51 (2016), 3.0 (2016) - 3.13 (2026) |
| License | zlib/libpng (LZMA module CPL-1.0, bzip2 module bzip2 license) |
| Website | https://nsis.sourceforge.io/ |
| On this wiki | Facts · Code · Notes · Topics |
Open-source script-driven installer builder for Windows (zlib/libpng license), originally written by Nullsoft for Winamp: makensis compiles a .nsi script into bytecode and appends it, with the compressed files, to a prebuilt PE stub (exehead). Its output is described on Format:NSIS installer.
Overview
makensis reads a script (.nsi), compiles every instruction into 28-byte entries of a small bytecode, collects strings, language tables and pages, compresses the result with zlib, bzip2 or LZMA (optionally solid) and writes: a prebuilt stub from its Stubs folder (<compressor>[_solid]-<target>, for example lzma_solid-x86-unicode; targets x86-ansi, x86-unicode, amd64-unicode, arm64-unicode), the firstheader, the compressed header and data, and a CRC-32. The stub (exehead, C, about 34 KiB of code) is a bytecode interpreter plus the wizard UI; it never changes per installer except for resources (icon, dialogs, manifest, version info) that makensis patches in. The file layout, compression detection, structures, opcodes and string encoding are on Format:NSIS installer.
Identification
- The output of makensis: see Format:NSIS installer#Identification (firstheader
EF BE AD DE+ "NullsoftInst" at a 512-aligned offset,.ndatasection, manifestNullsoft.NSIS.exeheadwith the version in its description). - At run time: an installer creates
$PLUGINSDIRas%TEMP%\ns<letter><hex>.tmp(GetTempFileName prefixns+ a letter) and extracts plugin DLLs (System.dll, nsDialogs.dll, nsExec.dll, StdUtils.dll...) there; a solid installer also unpacks its data block to a temporary file of the same pattern; an uninstaller re-runs itself from%TEMP%\~nsu<N>.tmp\Un.exe. - Plugin DLLs: ordinary DLLs whose exports take
(HWND hwndParent, int string_size, TCHAR *variables, stack_t **stacktop, extra_parameters *extra)(cdecl);extra_parametersstarts with a pointer toexec_flags_t(autoclose, all_user_var, exec_error, abort, exec_reboot, reboot_called, cur_insttype, plugin_api_version 0x00010000 since 2.42, silent, instdir_error, rtl, errlvl, alter_reg_view, status_update) followed by the ExecuteCodeSegment, validate_filename and RegisterPluginCallback function pointers.
Versions
- 2.x: ANSI only (strings use escape codes 0xFC-0xFF), x86 only.
- 3.0 (2016): Unicode targets (
Unicode true), escape codes 1-4, FileReadUTF16LE/FileWriteUTF16LE opcodes. - 3.06 (2020): GetKnownFolderPath / GetOSInfo opcode (65).
- 3.07 (2021): Unicode is the default target.
- 3.13 (September 2026) is the latest release when this page was written; 3.14 is in development.
Builds made with non-default configuration options (the logging build, NSIS_MAX_STRLEN=8192 "large strings" builds) produce installers whose opcode numbers or section sizes differ; electron-builder ships such a large-strings build.
Code & repositories
See the repository listed below (GitHub mirror of the official repository) and Code:NSIS installer/nsisinfo (Python).
- https://github.com/kichik/nsis @
f0bfe3e0062c57dc1ef90f1d235c7c0bd5a43be4· license: Zlib (declared by the contributor; GitHub's detector did not recognize COPYING)
GitHub mirror of the official NSIS source (makensis, the exehead stubs, plugins, docs). Source/exehead/fileform.h defines every on-disk structure and opcode, Source/exehead/fileform.c and exec.c show how the stub reads them, Source/build.cpp and fileform.cpp how makensis writes them; release tags (v20 ... v246, v30, v306 ...) let you compare versions. Compression modules: zlib (zlib license), bzip2 (bzip2 license), LZMA (CPL-1.0).
Tested on: Read at this commit and at tags v246, v30, v304, v305, v306 (fileform.h, fileform.c, exec.c, build.cpp, manifest.cpp, config.py); claims checked against 8 NSIS 3.0-3.12 uninstallers and one installer with Code:NSIS installer/nsisinfo (Python); not built. · checked 2026-10-17; last activity 2026-10-17
Evidence & references
- Source/build.cpp lines 4053-4093 (target suffixes and stub names), 128-138 (default target), Source/exehead/util.c 473-484 (
ns?temp names), Source/exehead/Main.c 371 (~nsu%X.tmp), Source/exehead/api.h 20-71 (plugin API), Docs/src/history.but (release dates and changes) at https://github.com/kichik/nsis commit f0bfe3e0062c57dc1ef90f1d235c7c0bd5a43be4. - Unverified: the claim that electron-builder ships a large-strings build rests only on the 16408-byte sections seen in two electron-builder uninstallers; check electron-builder's nsis resources.