Skip to content

electron builder.Interface.NsisOptions

Electron-Builder / electron-builder / NsisOptions

Extends

Extended by

Properties

allowElevation?

readonly optional allowElevation: boolean

assisted installer only. Allow requesting for elevation. If false, user will have to restart installer with elevated permissions.

Default

true

allowToChangeInstallationDirectory?

readonly optional allowToChangeInstallationDirectory: boolean

assisted installer only. Whether to allow user to change installation directory.

Default

false

artifactName?

readonly optional artifactName: null | string

The artifact file name template. Defaults to ${productName} Setup ${version}.${ext}.

Overrides

TargetSpecificOptions.artifactName


deleteAppDataOnUninstall?

readonly optional deleteAppDataOnUninstall: boolean

one-click installer only. Whether to delete app data on uninstall.

Default

false

displayLanguageSelector?

readonly optional displayLanguageSelector: boolean

Whether to display a language selection dialog. Not recommended (by default will be detected using OS language).

Default

false

include?

readonly optional include: null | string

The path to NSIS include script to customize installer. Defaults to build/installer.nsh. See Custom NSIS script.


installerHeader?

readonly optional installerHeader: null | string

assisted installer only. MUI_HEADERIMAGE, relative to the build resources or to the project directory.

Default

build/installerHeader.bmp

installerHeaderIcon?

readonly optional installerHeaderIcon: null | string

one-click installer only. The path to header icon (above the progress bar), relative to the build resources or to the project directory. Defaults to build/installerHeaderIcon.ico or application icon.


installerIcon?

readonly optional installerIcon: null | string

The path to installer icon, relative to the build resources or to the project directory. Defaults to build/installerIcon.ico or application icon.


installerLanguages?

readonly optional installerLanguages: null | string | string[]

The installer languages (e.g. en_US, de_DE). Change only if you understand what do you do and for what.


installerSidebar?

readonly optional installerSidebar: null | string

assisted installer only. MUI_WELCOMEFINISHPAGE_BITMAP, relative to the build resources or to the project directory. Defaults to build/installerSidebar.bmp or ${NSISDIR}\\Contrib\\Graphics\\Wizard\\nsis3-metro.bmp. Image size 164 × 314 pixels.


language?

readonly optional language: null | string

LCID Dec, defaults to 1033(English - United States).


license?

readonly optional license: null | string

The path to EULA license file. Defaults to license.txt or eula.txt (or uppercase variants). In addition to txt, rtf and html supported (don’t forget to use target="_blank" for links).

Multiple license files in different languages are supported — use lang postfix (e.g. _de, _ru). For example, create files license_de.txt and license_en.txt in the build resources. If OS language is german, license_de.txt will be displayed. See map of language code to name.

Appropriate license file will be selected by user OS language.


multiLanguageInstaller?

readonly optional multiLanguageInstaller: boolean

Whether to create multi-language installer. Defaults to unicode option value.


oneClick?

readonly optional oneClick: boolean

Whether to create one-click installer or assisted.

Default

true

Overrides

CommonWindowsInstallerConfiguration.oneClick


packElevateHelper?

readonly optional packElevateHelper: boolean

Whether to pack the elevate executable (required for electron-updater if per-machine installer used or can be used in the future). Ignored if perMachine is set to true.

Default

true

perMachine?

readonly optional perMachine: boolean

Whether to show install mode installer page (choice per-machine or per-user) for assisted installer. Or whether installation always per all users (per-machine).

If oneClick is true (default): Whether to install per all users (per-machine).

If oneClick is false and perMachine is true: no install mode installer page, always install per-machine.

If oneClick is false and perMachine is false (default): install mode installer page.

Default

false

Overrides

CommonWindowsInstallerConfiguration.perMachine


preCompressedFileExtensions?

readonly optional preCompressedFileExtensions: null | string | string[]

The file extension of files that will be not compressed. Applicable only for extraResources and extraFiles files.

Default

[".avi", ".mov", ".m4v", ".mp4", ".m4p", ".qt", ".mkv", ".webm", ".vmdk"]

removeDefaultUninstallWelcomePage?

readonly optional removeDefaultUninstallWelcomePage: boolean

assisted installer only. remove the default uninstall welcome page.

Default

false

script?

readonly optional script: null | string

The path to NSIS script to customize installer. Defaults to build/installer.nsi. See Custom NSIS script.


selectPerMachineByDefault?

readonly optional selectPerMachineByDefault: boolean

Whether to set per-machine or per-user installation as default selection on the install mode installer page.

Default

false

uninstallDisplayName?

readonly optional uninstallDisplayName: string

The uninstaller display name in the control panel.

Default

${productName} ${version}

uninstallerIcon?

readonly optional uninstallerIcon: null | string

The path to uninstaller icon, relative to the build resources or to the project directory. Defaults to build/uninstallerIcon.ico or application icon.


uninstallerSidebar?

readonly optional uninstallerSidebar: null | string

assisted installer only. MUI_UNWELCOMEFINISHPAGE_BITMAP, relative to the build resources or to the project directory. Defaults to installerSidebar option or build/uninstallerSidebar.bmp or build/installerSidebar.bmp or ${NSISDIR}\\Contrib\\Graphics\\Wizard\\nsis3-metro.bmp