Skip to main content

MSI Wrapped

The top-level msiWrapped key contains set of options instructing electron-builder on how it should build Windows MSI-Wrapped packages.

What is MSI-Wrapped?

MSI-Wrapped is a hybrid approach that combines the customizability of NSIS with the enterprise deployment compatibility of MSI. It works by:

  1. Building your normal NSIS installer
  2. Wrapping the NSIS .exe inside a minimal MSI package
  3. The MSI acts as a thin shell that executes the NSIS installer when deployed

This allows enterprise IT teams to deploy the package through MSI-compatible tools (Group Policy, SCCM, Intune) while you retain all of NSIS's powerful customization capabilities for the actual installation experience.

MSI-Wrapped vs. Native MSI

AspectMSI-WrappedNative MSI
Underlying installerNSISWiX-generated MSI
NSIS customizationFullNone
Enterprise MSI deploymentYesYes
Silent installVia NSIS flagsVia MSI /quiet
Windows Store (MSIX)LimitedBetter
ComplexityLowerHigher

When to Use MSI-Wrapped

Choose MSI-Wrapped when:

  • You already have a well-configured NSIS installer and need to deploy it via Group Policy or MDM
  • Your enterprise customers require MSI format but you don't want to maintain a separate MSI configuration
  • You need NSIS-level UI customization combined with MSI deployment

Choose native MSI when:

  • You need full MSI capabilities (custom actions, rollback, MSI database manipulation)
  • You're targeting Windows Store / MSIX conversion
  • You need clean per-machine/per-user support without NSIS

Configuration

Wrapped Installer Arguments

Pass additional command-line arguments to the wrapped NSIS installer when it is executed:

msiWrapped:
wrappedInstallerArgs: "/S /D=C:\\MyApp"

Impersonation

msiWrapped:
impersonate: false # Default: false

When impersonate: true, the MSI wrapper executes the NSIS installer under the user's identity rather than the system/SYSTEM account. This is useful for per-user installations that need to access user-specific resources.

Upgrade Code

msiWrapped:
upgradeCode: "{A1234567-BCDE-F012-3456-789ABCDEF012}"
Critical: Do Not Change After First Release

See the MSI upgrade code warning — the same applies here.

Complete Example

win:
target:
- nsis
- msi-wrapped

nsis:
oneClick: false
perMachine: true
allowToChangeInstallationDirectory: true

msiWrapped:
upgradeCode: "{A1234567-BCDE-F012-3456-789ABCDEF012}"
impersonate: false
wrappedInstallerArgs: "/SILENT"

Configuration

Interface: MsiWrappedOptions

Extends

Properties

additionalWixArgs?

readonly optional additionalWixArgs?: string[] | null

Any additional arguments to be passed to the WiX installer compiler, such as ["-ext", "WixUtilExtension"]


artifactName?

readonly optional artifactName?: string | null

The artifact file name template.

Inherited from

TargetSpecificOptions.artifactName


createDesktopShortcut?

readonly optional createDesktopShortcut?: boolean | "always"

Whether to create desktop shortcut. Set to always if to recreate also on reinstall (even if removed by user).

Default

true

Inherited from

CommonWindowsInstallerConfiguration.createDesktopShortcut


createStartMenuShortcut?

readonly optional createStartMenuShortcut?: boolean

Whether to create start menu shortcut.

Default

true

Inherited from

CommonWindowsInstallerConfiguration.createStartMenuShortcut


impersonate?

readonly optional impersonate?: boolean

Determines if the wrapped installer should be executed with impersonation

Default

false

readonly optional menuCategory?: string | boolean

Whether to create submenu for start menu shortcut and program files directory. If true, company name will be used. Or string value.

Default

false

Inherited from

CommonWindowsInstallerConfiguration.menuCategory


oneClick?

readonly optional oneClick?: boolean

Inherited from

CommonWindowsInstallerConfiguration.oneClick


perMachine?

readonly optional perMachine?: boolean

Whether to install per all users (per-machine).

Default

false

Inherited from

CommonWindowsInstallerConfiguration.perMachine


publish?

optional publish?: Publish

Inherited from

TargetSpecificOptions.publish


runAfterFinish?

readonly optional runAfterFinish?: boolean

Whether to run the installed application after finish. For assisted installer corresponding checkbox will be removed.

Default

true

Inherited from

CommonWindowsInstallerConfiguration.runAfterFinish


shortcutName?

readonly optional shortcutName?: string | null

The name that will be used for all shortcuts. Defaults to the application name.

Inherited from

CommonWindowsInstallerConfiguration.shortcutName


upgradeCode?

readonly optional upgradeCode?: string | null

The upgrade code. Optional, by default generated using app id.


warningsAsErrors?

readonly optional warningsAsErrors?: boolean

If warningsAsErrors is true (default): treat warnings as errors. If warningsAsErrors is false: allow warnings.

Default

true

wrappedInstallerArgs?

readonly optional wrappedInstallerArgs?: string | null

Extra arguments to provide to the wrapped installer (ie: /S for silent install)