The Nullsoft Scriptable Install System (NSIS) is a tool that allows you to create Windows installers. NSIS supports various command-line parameters that can be used to customize the installation process. Here are some commonly used command-line parameters for NSIS:
|NSIS Option||Command-line Parameter|
|Disable CRC Check|
|Set Default Installation Directory|
NSIS: Silent Install
- /S runs the installer or uninstaller silently (case sensitive)
- Note: Must be uppercase /S as lowercase /s will not work!
NSIS: Disable the CRC Check
Installer.exe /NCRC /S
- /NCRC disables the CRC check, unless CRCCheck force was used in the script.
- This parameter determines whether the installer will perform a CRC (Cyclic Redundancy Check) on itself before proceeding with the installation. By default, the installer performs the CRC to ensure its integrity. However, if the user includes the
/NCRCflag in the command line when running the installer and you haven’t explicitly specified the ‘force’ option, the CRC check will be skipped. This means that the user will be allowed to install the installer even if it’s potentially corrupted.
NSIS: Set Default Installation Directory
Installer.exe /D=C:\Program Files\NSIS
- /D is used to specify the default installation directory in Nullsoft Scriptable Install System (NSIS).
- It is important to note that /D should be the last parameter used in the command line and should not include any quotation marks, even if the path contains spaces. Only absolute paths are supported with this parameter.
NSIS: Uninstaller Specific Options
Uninstaller.exe /S _?=C:\Program Files\NSIS
- The _?= parameter is used to set the value of the $INSTDIR variable in the Nullsoft Scriptable Install System (NSIS). It not only sets the installation directory but also prevents the uninstaller from copying itself to the temporary directory and running from there.
- It is important to note that _?= should be the last parameter used in the command line and should not include any quotation marks, even if the path contains spaces.
NSIS: Application Examples
Always make sure to test everything in a development environment prior to implementing anything into production. The information in this article is provided “As Is” without warranty of any kind.