Skip to content

vweevers/windows-bin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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