windows-bin

Find native Windows executables

Usage no npm install needed!

<script type="module">
  import windowsBin from 'https://cdn.skypack.dev/windows-bin';
</script>

README

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