{
  "_args": [
    [
      "winreg@https://registry.npmjs.org/winreg/-/winreg-1.2.3.tgz",
      "D:\\work\\3\\s\\extensions\\git"
    ]
  ],
  "_from": "winreg@1.2.3",
  "_id": "winreg@1.2.3",
  "_inCache": true,
  "_location": "/winreg",
  "_phantomChildren": {},
  "_requested": {
    "name": "winreg",
    "raw": "winreg@https://registry.npmjs.org/winreg/-/winreg-1.2.3.tgz",
    "rawSpec": "https://registry.npmjs.org/winreg/-/winreg-1.2.3.tgz",
    "scope": null,
    "spec": "https://registry.npmjs.org/winreg/-/winreg-1.2.3.tgz",
    "type": "remote"
  },
  "_requiredBy": [
    "/vscode-extension-telemetry"
  ],
  "_resolved": "https://registry.npmjs.org/winreg/-/winreg-1.2.3.tgz",
  "_shasum": "93ad116b2696da87d58f7265a8fcea5254a965d5",
  "_shrinkwrap": null,
  "_spec": "winreg@https://registry.npmjs.org/winreg/-/winreg-1.2.3.tgz",
  "_where": "D:\\work\\3\\s\\extensions\\git",
  "author": {
    "name": "Paul Bottin"
  },
  "bugs": {
    "url": "https://github.com/fresc81/node-winreg/issues"
  },
  "dependencies": {},
  "description": "provides access to the windows registry through the REG tool",
  "devDependencies": {
    "ink-docstrap": "^1.1.4",
    "jsdoc": "^3.4.0",
    "mocha": "^3.0.2",
    "moment": "^2.11.2",
    "unit.js": "^2.0.0"
  },
  "gitHead": "36cfe63a8dcb700cf44b0b7317827099d19c26c1",
  "homepage": "http://fresc81.github.io/node-winreg",
  "keywords": [
    "windows",
    "registry"
  ],
  "license": "BSD-2-Clause",
  "main": "lib/registry.js",
  "name": "winreg",
  "optionalDependencies": {},
  "readme": "\r\n[![NPM](https://nodei.co/npm/winreg.png?downloads=true&stars=true)](https://nodei.co/npm/winreg/)\r\n\r\n[![Build status](https://ci.appveyor.com/api/projects/status/sxal24cfk9nlmib9?svg=true)](https://ci.appveyor.com/project/fresc81/node-winreg) [![Dependency Status](https://david-dm.org/fresc81/node-winreg.svg)](https://david-dm.org/fresc81/node-winreg) [![devDependency Status](https://david-dm.org/fresc81/node-winreg/dev-status.svg)](https://david-dm.org/fresc81/node-winreg#info=devDependencies) [![Join the chat at https://gitter.im/fresc81/node-winreg](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/fresc81/node-winreg?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\r\n\r\n\r\n# node-winreg #\r\n\r\nnode module that provides access to the Windows Registry through the REG commandline tool\r\n\r\n\r\n## Installation ##\r\n\r\nThe following command installs node-winreg.\r\n\r\n```shell\r\nnpm install winreg \r\n```\r\n\r\nIf you prefer to install _without the delopement tools used to generate the HTML documentation_ (into a production environment for example) you should use the following command.\r\n\r\n```shell\r\nnpm install winreg --production\r\n```\r\n\r\nNote that the development dependencies will not be installed if this package was installed as a dependency of another package.\r\n\r\n\r\n## Documentation ##\r\n\r\nThe documentation is generated using [jsdoc](http://github.com/jsdoc3/jsdoc \"jsdoc Website\") with the [docstrap template](http://docstrap.github.io/docstrap \"docstrap website\"). You can view the API documentation [online](http://fresc81.github.io/node-winreg \"online documentation\"), download the latest documentation or generate it from the sourcecode.\r\n\r\n\r\n### Online Documentation ###\r\n\r\nView the latest docs [online](http://fresc81.github.io/node-winreg \"online documentation\").\r\n\r\n\r\n### Download Documentation ###\r\n\r\nTo download the latest docs from GIT the following command is used.\r\n\r\n```shell\r\nnpm run-script download-docs\r\n```\r\n\r\n\r\n### Generate Documentation ###\r\n\r\nTo generate the docs from the sources you can use the following command.\r\n\r\n```shell\r\nnpm run-script generate-docs\r\n```\r\n\r\nNote that generating the docs requires the development dependencies to be installed.\r\n\r\n\r\n## Example Usage ##\r\n\r\nLet's start with an example. The code below lists the autostart programs of the current user.\r\n\r\n```javascript\r\nvar Registry = require('winreg')\r\n,   regKey = new Registry({                                       // new operator is optional\r\n      hive: Registry.HKCU,                                        // open registry hive HKEY_CURRENT_USER\r\n      key:  '\\\\Software\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Run' // key containing autostart programs\r\n    })\r\n\r\n// list autostart programs\r\nregKey.values(function (err, items /* array of RegistryItem */) {\r\n  if (err)\r\n    console.log('ERROR: '+err);\r\n  else\r\n    for (var i=0; i<items.length; i++)\r\n      console.log('ITEM: '+items[i].name+'\\t'+items[i].type+'\\t'+items[i].value);\r\n});\r\n```\r\n\r\n## Troubleshooting ##\r\n\r\n\r\n### Access to restricted keys ###\r\n\r\nSince Windows Vista access to certain Registry Hives (HKEY_LOCAL_MACHINE or short HKLM for example) is restricted to processes that run in a security elevated context even if the user that starts the process is an admin. You can start a console within that context by right clicking the console shortcut and selecting the item with the shield icon called \"Run as administrator\" from the context menu.\r\n\r\nUnder some rare circumstances access to Registry Hives or particular keys may also be blocked by some antivirus programs or the Windows Group Policy Editor (google for gpedit.msc).\r\n\r\nYou can also use the regedit.exe tool shipped with Windows to check if you actually have access.\r\n\r\n\r\n### Processing UTF-8 data ###\r\n\r\nThe Microsoft Windows console isn't capable of handling UTF-8 encoded text unless you set it up properly. If you see weird question marks for certain characters, it's probhably a problem with the encoding.\r\n\r\nBy default the console is setup to use an encoding that suits the language of the Windows operating system installation. Windows uses codepages to specify encodings for the console. The codepage is a unique number which is assigned to each encoding.\r\n\r\nIf you want to query the currently selected codepage you can type the command <code>chcp</code> (w/o parameters). To set a new codepage (UTF-8 for this example) you pass the codepage number as the only argument to <code>chcp</code>. The codepage value for UTF-8 is 65001.\r\n\r\nYou can easily do this from within your nodejs script by using the <code>child_process.execSync(...)</code> function like the following example shows.\r\n\r\n```javascript\r\nvar execSync = require('child_process').execSync;\r\nconsole.log(execSync('chcp').toString());\r\nconsole.log(execSync('chcp 65001').toString());\r\n```\r\n\r\nAn even better approach would be to extract and store the value returned by a call to <code>chcp</code> prior setting the console to UTF-8 and resetting the codepage after your script is done.\r\n\r\n\r\n## License ##\r\n\r\nThis project is released under [BSD 2-Clause License](http://opensource.org/licenses/BSD-2-Clause).\r\n\r\nCopyright (c) 2016, Paul Bottin All rights reserved.\r\n\r\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\r\n\r\n * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\r\n * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\r\n\r\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git://github.com/fresc81/node-winreg.git"
  },
  "scripts": {
    "checkout-docs": "git clone -b gh-pages git@github.com:fresc81/node-winreg.git docs",
    "download-docs": "git clone -b gh-pages https://github.com/fresc81/node-winreg.git docs",
    "generate-docs": "jsdoc -c ./jsdoc.conf.json",
    "test": "mocha test"
  },
  "version": "1.2.3"
}
