node-msi

1.1.1 • Public • Published

node-msi

Fetches and starts the latest Node installer for Windows.

Installation

npm install node-msi

Quickstart

const { fetch, start } = require('node-msi')
 
// fetch latest Node 64-bit installer
// to Downloads and start it
 
fetch()
    .then(start)
    .catch(err => console.error(err))

API

msi.fetch({ version, bits, dir })

> fetches the specified Node installer from https://nodejs.org/dist/

  • version {String}: the installer version to be fetched, e.g. 6.0.0; default: the latest Node version
  • bits {Number}: 32 or 64; default: 64
  • dir {String}: the directory where the installer will be downloaded to; default: C:/Users/<User>/Downloads
  • returns {Promise}: resolves with the path of the downloaded installer; rejects if an Error occurs

msi.start(path)

> starts the Node installer from the specified path

  • path {String}: the path of the installer
  • returns {Promise}: resolves once the installer starts; rejects if an Error occurs

License

WTFPL – Do What the F*ck You Want to Public License.

Made with ❤️ by @MarkTiedemann.

Package Sidebar

Install

npm i node-msi

Weekly Downloads

1

Version

1.1.1

License

WTFPL

Last publish

Collaborators

  • marktiedemann