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:
- Building your normal NSIS installer
- Wrapping the NSIS
.exeinside a minimal MSI package - 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
| Aspect | MSI-Wrapped | Native MSI |
|---|---|---|
| Underlying installer | NSIS | WiX-generated MSI |
| NSIS customization | Full | None |
| Enterprise MSI deployment | Yes | Yes |
| Silent install | Via NSIS flags | Via MSI /quiet |
| Windows Store (MSIX) | Limited | Better |
| Complexity | Lower | Higher |
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}"
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?
readonlyoptionaladditionalWixArgs?:string[] |null
Any additional arguments to be passed to the WiX installer compiler, such as ["-ext", "WixUtilExtension"]
artifactName?
readonlyoptionalartifactName?:string|null
The artifact file name template.
Inherited from
TargetSpecificOptions.artifactName
createDesktopShortcut?
readonlyoptionalcreateDesktopShortcut?: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?
readonlyoptionalcreateStartMenuShortcut?:boolean
Whether to create start menu shortcut.
Default
true
Inherited from
CommonWindowsInstallerConfiguration.createStartMenuShortcut
impersonate?
readonlyoptionalimpersonate?:boolean
Determines if the wrapped installer should be executed with impersonation
Default
false
menuCategory?
readonlyoptionalmenuCategory?: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?
readonlyoptionaloneClick?:boolean
Inherited from
CommonWindowsInstallerConfiguration.oneClick
perMachine?
readonlyoptionalperMachine?:boolean
Whether to install per all users (per-machine).
Default
false
Inherited from
CommonWindowsInstallerConfiguration.perMachine
publish?
optionalpublish?:Publish
Inherited from
runAfterFinish?
readonlyoptionalrunAfterFinish?:boolean
Whether to run the installed application after finish. For assisted installer corresponding checkbox will be removed.
Default
true
Inherited from
CommonWindowsInstallerConfiguration.runAfterFinish
shortcutName?
readonlyoptionalshortcutName?:string|null
The name that will be used for all shortcuts. Defaults to the application name.
Inherited from
CommonWindowsInstallerConfiguration.shortcutName
upgradeCode?
readonlyoptionalupgradeCode?:string|null
The upgrade code. Optional, by default generated using app id.
warningsAsErrors?
readonlyoptionalwarningsAsErrors?:boolean
If warningsAsErrors is true (default): treat warnings as errors. If warningsAsErrors is false: allow warnings.
Default
true
wrappedInstallerArgs?
readonlyoptionalwrappedInstallerArgs?:string|null
Extra arguments to provide to the wrapped installer (ie: /S for silent install)