Socket
Book a DemoInstallSign in
Socket

electron-windows-msix

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-windows-msix

MSIX packager for Electron Apps

1.2.8
latest
Source
npmnpm
Version published
Weekly downloads
1.8K
-60.34%
Maintainers
1
Weekly downloads
 
Created
Source

MSIX packager for Electron Apps

electron_msix

Electron-Windows-MSIX is a module that lets you create an MSIX installer from a packaged Electron App.

Prerequisites

  • Windows 10 or 11
  • The Windows 10 SDK you wan to target https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
  • An understanding of MSIX packaging and AppxManifest, read more at https://learn.microsoft.com/en-us/windows/msix/package/manual-packaging-root

Installation

npm install electron-windows-msix

Usage

  PACKAGING OPTIONS

  appDir            - The folder containing the packaged Electron App
  appManifest       - The AppManifest.xml containing necessary declarations to build the MSIX
  manifestVariables - Optional manifest variables to generate a manifest if manifest file is not provided
  packageAssets     - Required assets declared in AppManifest.xml. E.g. icons and tile images
  outputDir         - The output directory for the finished MSIX package.
  packageName       - Optional name for the finished MSIX package. If not provided a name will be derived from AppManifest.xml.
  windowsKitVersion - Optional version of the WindowsKit to use. If WindowsKitPath is provide then it will trump this. If neither WindowsKitVersion nor
                      WindowsKitPath is provided then the Windows Kit path will be derived from the S Version specified in AppManifest.xml.
  windowsKitPath    - An optional full path to the WindowsKit. This path will trump both WindowsKitVersion and AppxManifest.
  createPri         - Indicates whether to create Pri resource files. It is enabled by default.
  cert              - An optional path to the certificate. If not provided then the MSIX will not be signed. Beware that the Publisher of the cert
                      must match the AppxManifest Publisher.
  cert_pass         - Optionally the password for the cert.
  signParams        - Optionally an explicit set parameter for the SignTool. If present it will supersede the cert an cert_pass parameter.
  sign              - Optional parameter that indicates whether the MSIX should be signed. True by default.
  logLevel          - Optional log level. By default the module will be silent. The 'warn' level will give heads up on irregularities.
                      The 'debug' level will give extensive output to identify problems with the module.
MANIFEST GENERATION VARIABLES

packageIdentity           - The identity of the MSIX package.
publisher                 - The publisher of the MSIX package. This will also  be used to create a dev certificate if one is
publisherDisplayName      - The display name of the publisher of the MSIX package.
packageVersion            - The version of the MSIX package. Semantic version can be used. However, pre-release version will be converted to valid Windows versions .
packageDisplayName        - The display name of the MSIX package. This will be used to set the DisplayName attribute in the AppxManifest.xml.
packageDescription        - The description of the MSIX package. This will be used to set the Description attribute in the AppxManifest.xml.
packageBackgroundColor    - The background color of the MSIX package. This will be used to set the BackgroundColor attribute in the VisualElements element in theAppxManifest.xml.
appExecutable             - The executable of the MSIX package. This will be used to set the Executable attribute in the AppxManifest.xml.
appDisplayName            - The name of the MSIX package. This will be used to set the DisplayName attribute in the VisualElements element in the AppxManifest.xml.
targetArch                - The target architecture of the MSIX package. This will be used to set the ProcessorArchitecture attribute in the AppxManifest.xml. 'x64' |'arm64' | 'x86' | 'arm' | '*';
packageMinOSVersion       - The minimum OS version the MSIX package requires. This will be used to set the MinVersion attribute in the TargetDeviceFamily element in theAppxManifest.xml.
packageMaxOSVersionTested - The maximum OS version the MSIX package has been tested on. This will be used to set the MaxVersionTested attribute in the TargetDeviceFamily element in the AppxManifest.xml.

Minimal example that creates a manifest and a dev cert

import { packageMSIX } from "electron-windows-msix";

await packageMSIX({
  appDir: 'C:\\temp\\myapp',
  outputDir: 'C:\\temp\\out',
  manifestVariables: {
    publisher: 'CN=Dev Publisher',
    packageIdentity: 'com.example.app',
    packageVersion: '1.42.0.0',
    appExecutable: 'hellomsix.exe',
    targetArch: 'x64',
  },
});

Minimal example that derives all possible data from the Manifest

import { packageMSIX } from "electron-windows-msix";

await packageMSIX({
  appDir: 'C:\\temp\\myapp',
  appManifest: 'C:\\temp\\AppxManifest.xml',
  packageAssets: 'C:\\temp\\assets',
  outputDir: 'C:\\temp\\out',
  cert: 'C:\\temp\\app_cert.pfx',
  cert_pass: 'hellomsix',
});

Example that controls all options with via manifest varaibles

import { packageMSIX } from "electron-windows-msix";

await packageMSIX({
  appDir: 'C:\\temp\\myapp',
  packageAssets: 'C:\\temp\\assets',
  outputDir: 'C:\\temp\\out',
  manifestVariables: {
    appDisplayName: 'Hello MSIX',
    publisher: 'CN=Dev Publisher',
    publisherDisplayName: 'Dev Publisher',
    packageDisplayName: 'Hello MSIX',
    packageDescription: 'Just a test app',
    packageBackgroundColor: '#000000',
    packageIdentity: 'com.example.app',
    packageVersion: '1.42.0.0',
    appExecutable: 'hellomsix.exe',
    targetArch: 'x64',
    packageMinOSVersion: '10.0.19041.0',
    packageMaxOSVersionTested: '10.0.19041.0',
  },
  windowsKitPath: 'C:\\Program Files (x86)\\Windows Kits\\10\\bin\\19041\\x64',
  createPri: true,
  cert: 'C:\\temp\\app_cert.pfx',
  cert_pass: 'hellomsix',
  packageName: 'MyApp.msix',
  logLevel: 'warn',
  sign: true
});

Example that controls all options with an existing manifest

import { packageMSIX } from "electron-windows-msix";

await packageMSIX({
  appDir: 'C:\\temp\\myapp',
  appManifest: 'C:\\temp\\AppxManifest.xml',
  packageAssets: 'C:\\temp\\assets',
  outputDir: 'C:\\temp\\out',
  windowsKitPath: 'C:\\Program Files (x86)\\Windows Kits\\10\\bin\\10.0.17763.0\\x64',
  createPri: true,
  cert: 'C:\\temp\\app_cert.pfx',
  cert_pass: 'hellomsix',
  packageName: 'MyApp.msix',
  logLevel: 'warn',
  sign: true
});

Keywords

MSIX

FAQs

Package last updated on 27 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.