npm.io
1.0.1 • Published 4 years ago

windows-bin

Licence
MIT
Version
1.0.1
Deps
3
Size
9 kB
Vulns
0
Weekly
0
Stars
3

windows-bin

Find Windows core executables like cscript, preferring the native 64-bit version regardless of Node.js bitness. Because by default, when running 32-bit Node.js, Windows would redirect to 32-bit WoW64 executables.

npm status AppVeyor build status Standard

Usage

const bin = require('windows-bin')

// C:\Windows\Sysnative\cscript.exe
bin('cscript', function(err, path) {
  console.log(path)
})

// C:\Windows\system32\cscript.exe
bin('cscript', { native: false }, function(err, path) {
  console.log(path)
})

Install

With npm do:

npm install windows-bin

License

MIT

Keywords