windows-env
Normalized environment variables for Windows XP and up
Last updated 10 years ago by vweevers .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install windows-env 
SYNC missed versions from official npm registry.

windows-env

Normalized environment variables for Windows XP and up.

npm status Build status Dependency status

example

const env = require('windows-env')

console.log('32-bit Program Files: %s', env.PROGRAMFILES_X86)

// This is true even if you run it with 32-bit Node.js
if (env.X64) {
  console.log('64-bit Program Files: %s', env.PROGRAMFILES_X64)
}

exports

All of process.env uppercased, and:

  • PROGRAMFILES_X86: C:\Program Files (x86) on 64 bit Windows, else C:\Program Files
  • PROGRAMFILES_X64: C:\Program Files on 64 bit Windows, else undefined
  • USERPROFILE: USERPROFILE or HOMEDRIVE + HOMEPATH
  • LOCALAPPDATA: this is usually USERPROFILE\AppData\Local, falls back to USERPROFILE\Local Settings\Application Data for Windows XP
  • X64: true on 64 bit Windows, regardless of node's bitness

install

With npm do:

npm install windows-env

license

MIT © Vincent Weevers

Current Tags

  • 1.0.1                                ...           latest (10 years ago)

2 Versions

  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (1)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |