1.1.1 • Published 9 years ago
node-msi v1.1.1
node-msi
Fetches and starts the latest Node installer for Windows.
Installation
npm install node-msiQuickstart
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}:32or64; default:64 - dir
{String}: the directory where the installer will be downloaded to; default:C:/Users/<User>/Downloads - returns
{Promise}: resolves with thepathof the downloaded installer; rejects if anErroroccurs
msi.start(path)
> starts the Node installer from the specified path
- path
{String}: thepathof the installer - returns
{Promise}: resolves once the installer starts; rejects if anErroroccurs
License
WTFPL – Do What the F*ck You Want to Public License.
Made with :heart: by @MarkTiedemann.