# windows-env

> Normalized environment variables for Windows XP and up

Latest version **1.0.1** (published 2016-03-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install windows-env
pnpm add windows-env
yarn add windows-env
bun add windows-env
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-03-12 |
| First published | 2016-03-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Vincent Weevers |
| Maintainers | vweevers |
| Keywords | appdata, arch, env, programfiles, userprofile, windows |

## Links

- npm: https://www.npmjs.com/package/windows-env
- Repository: https://github.com/vweevers/windows-env
- Issues: https://github.com/vweevers/windows-env/issues
- npm.io page: https://npm.io/package/windows-env

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-03-12
- 1.0.0 — 2016-03-12

## README

# windows-env

**Normalized environment variables for Windows XP and up.**

[![npm status](http://img.shields.io/npm/v/windows-env.svg?style=flat-square)](https://www.npmjs.org/package/windows-env) [![Build status](https://img.shields.io/appveyor/ci/vweevers/windows-env.svg?style=flat-square)](https://ci.appveyor.com/project/vweevers/windows-env) [![Dependency status](https://img.shields.io/david/vweevers/windows-env.svg?style=flat-square)](https://david-dm.org/vweevers/windows-env)

## example

```js
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](https://npmjs.org) do:

```
npm install windows-env
```

## license

[MIT](http://opensource.org/licenses/MIT) © Vincent Weevers

---
_Source: https://npm.io/package/windows-env · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
