{"id":702,"url":"https://github.com/coreybutler/node-windows","last_synced_at":"2025-05-13T16:11:22.942Z","repository":{"id":6394806,"uuid":"7632747","full_name":"coreybutler/node-windows","owner":"coreybutler","description":"Windows support for Node.JS scripts (daemons, eventlog, UAC, etc).","archived":false,"fork":false,"pushed_at":"2024-10-01T21:28:07.000Z","size":2199,"stargazers_count":2873,"open_issues_count":70,"forks_count":359,"subscribers_count":88,"default_branch":"master","last_synced_at":"2025-04-18T07:27:31.592Z","etag":null,"topics":["background","daemon","node-windows","nodejs","windows"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coreybutler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["coreybutler"]}},"created_at":"2013-01-15T20:33:38.000Z","updated_at":"2025-04-16T09:36:54.000Z","dependencies_parsed_at":"2023-01-13T13:59:33.403Z","dependency_job_id":"380f7c26-6204-4677-bbd5-3a98d3c0f139","html_url":"https://github.com/coreybutler/node-windows","commit_stats":{"total_commits":190,"total_committers":43,"mean_commits":"4.4186046511627906","dds":"0.32105263157894737","last_synced_commit":"54ac1e382f1cf56bc7278672672aba1342c96c01"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreybutler%2Fnode-windows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreybutler%2Fnode-windows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreybutler%2Fnode-windows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coreybutler%2Fnode-windows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coreybutler","download_url":"https://codeload.github.com/coreybutler/node-windows/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250340418,"owners_count":21414543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["background","daemon","node-windows","nodejs","windows"],"created_at":"2024-01-05T20:15:29.201Z","updated_at":"2025-04-23T20:55:10.092Z","avatar_url":"https://github.com/coreybutler.png","language":"JavaScript","readme":"# node-windows\n\n![NPM version](https://img.shields.io/npm/v/node-windows?label=node-windows\u0026logo=npm\u0026style=for-the-badge)\n![NGN Dependencies](https://img.shields.io/librariesio/release/npm/node-windows?style=for-the-badge)\n\n This library can be used to install/start/stop/uninstall Node scripts as Windows background services for **production** environments. This is not a tool for developing applications, it is a tool for releasing them. This tool generates an executable that will run your app with whichever version of Node.js is installed on the computer.\n\n  See [node-mac](http://github.com/coreybutler/node-mac) and [node-linux](http://github.com/coreybutler/node-linux) if you need to support those operating systems.\n    \n[Tweet me (@goldglovecb)](http://twitter.com/goldglovecb) if you need me.\n\n## Sponsors\n\u003cbr/\u003e\n\u003cdiv\u003e\n  \u003ctable cellpadding=\"5\" cellspacing=\"0\" border=\"0\"\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ca href=\"https://metadoc.io\"\u003e\u003cimg src=\"https://github.com/coreybutler/staticassets/raw/master/sponsors/metadoclogobig.png\" width=\"200px\"/\u003e\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"https://enabledb.com\"\u003e\u003cimg src=\"https://github.com/coreybutler/staticassets/raw/master/images/logos/logo_enabledb_w_text.png\" width=\"200px\"/\u003e\u003c/a\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003ca href=\"https://butlerlogic.com\"\u003e\u003cimg src=\"https://github.com/coreybutler/staticassets/raw/master/sponsors/butlerlogic_logo.png\" width=\"200px\"/\u003e\u003c/a\u003e\u003c/td\u003e\n      \u003ctd width=\"25%\" align=\"center\"\u003e\u003ca href=\"https://github.com/microsoft\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/770982/195955265-5c3dca78-7140-4ec6-b05a-f308518643ee.png\" height=\"30px\"/\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd colspan=\"4\" align=\"center\"\u003e\n        \u003ca href=\"https://github.com/sponsors/coreybutler\"\u003e\u003cimg src=\"https://img.shields.io/github/sponsors/coreybutler?label=Individual%20Sponsors\u0026logo=github\u0026style=social\"/\u003e\u003c/a\u003e\n        \u0026nbsp;\u003ca href=\"https://github.com/sponsors/coreybutler\"\u003e\u003cimg src=\"https://img.shields.io/badge/-Become%20a%20Sponsor-yellow\"/\u003e\u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd colspan=\"4\" align=\"center\"\u003e\n        \u003cimg src=\"https://github.blog/wp-content/uploads/2020/09/github-stars-logo_Color.png\" width=\"50\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eCan't sponsor?\u003c/b\u003e\u003cbr/\u003eConsider \u003ca href=\"https://stars.github.com/nominate/\" target=\"_blank\"\u003enominating @coreybutler for a Github star\u003c/a\u003e.\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/table\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\n## Overview\n\nThe following features are available in node-windows:\n\n- **Service Management**: Run Node.js scripts as native Windows services. Includes monitoring.\n- **Event Logging**: Create logs in the Event log.\n- **Commands**:\n  - _Elevated Permissions_: Run a command with elevated privileges (may prompt user for acceptance)\n  - _Sudo_: Run an `exec` command as a sudoer.\n  - _Identify Administrative Privileges_: Determines whether the current user has administrative privileges.\n  - _List Tasks_: A method to list running windows tasks/services.\n  - _Kill Task_: A method to kill a specific windows service/task (by PID).\n\n## Installation\n\nThe recommended way to install node-windows is with npm, using the global flag:\n\n`npm install -g node-windows`\n\nThen, in your project root, run:\n\n`npm link node-windows`\n\nHowever; it is possible to use node-windows without the global flag (i.e. install directly into the project root).\nMore details regarding why this is not the recommended approach are available throughout this Readme.\n\n## NO NATIVE MODULES\n\nUsing native node modules on Windows can suck. Most native modules are not distributed in a binary format.\nInstead, these modules rely on `npm` to build the project, utilizing [node-gyp](https://github.com/TooTallNate/node-gyp).\nThis means developers need to have Visual Studio (and potentially other software) installed on the system,\njust to install a native module. This is portable, but painful... mostly because Visual Studio\nitself is over 2GB.\n\n**node-windows does not use native modules.** There are some binary/exe utilities, but everything\nneeded to run more complex tasks is packaged and distributed in a readily usable format. So, no need for\nVisual Studio... at least not for this module.\n\n---\n\n# Windows Services\n\nnode-windows has a utility to run Node.js scripts as Windows services. Please note that like all\nWindows services, creating one requires administrative privileges. To create a service with\nnode-windows, prepare a script like:\n\n```js\nvar Service = require('node-windows').Service;\n\n// Create a new service object\nvar svc = new Service({\n  name:'Hello World',\n  description: 'The nodejs.org example web server.',\n  script: 'C:\\\\path\\\\to\\\\helloworld.js',\n  nodeOptions: [\n    '--harmony',\n    '--max_old_space_size=4096'\n  ]\n  //, workingDirectory: '...'\n  //, allowServiceLogon: true\n});\n\n// Listen for the \"install\" event, which indicates the\n// process is available as a service.\nsvc.on('install',function(){\n  svc.start();\n});\n\nsvc.install();\n```\n\nThe code above creates a new `Service` object, providing a pretty name and description.\nThe `script` attribute identifies the Node.js script that should run as a service. Upon running\nthis, the script will be visible from the Windows Services utility.\n\n![Windows Service](https://raw.github.com/coreybutler/node-windows/master/docs/service.png)\n\nThe `Service` object emits the following events:\n\n- _install_ - Fired when the script is installed as a service.\n- _alreadyinstalled_ - Fired if the script is already known to be a service.\n- _invalidinstallation_ - Fired if an installation is detected but missing required files.\n- _uninstall_ - Fired when an uninstallation is complete.\n- _alreadyuninstalled_ - Fired when an uninstall is requested and no installation exists.\n- _start_ - Fired when the new service is started.\n- _stop_ - Fired when the service is stopped.\n- _error_ - Fired in some instances when an error occurs.\n\nIn the example above, the script listens for the `install` event. Since this event\nis fired when a service installation is complete, it is safe to start the service.\n\nServices created by node-windows are similar to most other services running on Windows.\nThey can be started/stopped from the windows service utility, via `NET START` or `NET STOP` commands,\nor even managed using the \u003ca href=\"http://technet.microsoft.com/en-us/library/dd228922(v=ws.10).aspx\"\u003esc\u003c/a\u003e\nutility.\n\n### Command-line Options\n\nIt may be desired to specify command-line switches to your script. You can do this by setting the `scriptOptions` within the service config:\n\n```js\nvar svc = new Service({\n  name:'Hello World',\n  description: 'The nodejs.org example web server.',\n  script: 'C:\\\\path\\\\to\\\\helloworld.js',\n  scriptOptions: '-c C:\\\\path\\\\to\\\\somewhere\\\\special -i'\n});\n```\n\n\n### Environment Variables\n\nSometimes you may want to provide a service with static data, passed in on creation of the service. You can do this by setting environment variables in the service config, as shown below:\n\n```js\nvar svc = new Service({\n  name:'Hello World',\n  description: 'The nodejs.org example web server.',\n  script: 'C:\\\\path\\\\to\\\\helloworld.js',\n  env: {\n    name: \"HOME\",\n    value: process.env[\"USERPROFILE\"] // service is now able to access the user who created its' home directory\n  }\n});\n```\nYou can also supply an array to set multiple environment variables:\n\n```js\nvar svc = new Service({\n  name:'Hello World',\n  description: 'The nodejs.org example web server.',\n  script: 'C:\\\\path\\\\to\\\\helloworld.js',\n  env: [{\n    name: \"HOME\",\n    value: process.env[\"USERPROFILE\"] // service is now able to access the user who created its' home directory\n  },\n  {\n    name: \"TEMP\",\n    value: path.join(process.env[\"USERPROFILE\"],\"/temp\") // use a temp directory in user's home directory\n  }]\n});\n```\n\n\n### Node Executable Path\n\nThere are times when you may want to specify a specific `node` executable to use to run your script. You can do this by setting the `execPath` in the service config, as shown below:\n\n```js\nvar svc = new Service({\n  name:'Hello World',\n  description: 'The nodejs.org example web server.',\n  script: 'C:\\\\path\\\\to\\\\helloworld.js',\n  execPath: 'C:\\\\path\\\\to\\\\specific\\\\node.exe'\n});\n```\n\n\n### User Account Attributes\n\nIf you need to specify a specific user or particular credentials to manage a service, the following\nattributes may be helpful.\n\nThe `user` attribute is an object with three keys: `domain`,`account`, and `password`.\nThis can be used to identify which user the service library should use to perform system commands.\nBy default, the domain is set to the local computer name, but it can be overridden with an Active Directory\nor LDAP domain. For example:\n\n**app.js**\n```js\nvar Service = require('node-windows').Service;\n\n// Create a new service object\nvar svc = new Service({\n  name:'Hello World',\n  script: require('path').join(__dirname,'helloworld.js'),\n  //, allowServiceLogon: true \n});\n\nsvc.logOnAs.domain = 'mydomain.local';\nsvc.logOnAs.account = 'username';\nsvc.logOnAs.password = 'password';\n...\n```\n\nBoth the account and password must be explicitly defined if you want the service module to\nrun commands as a specific user. By default, it will run using the user account that launched\nthe process (i.e. who launched `node app.js`).\n\nIf you want to instruct winsw to allow service account logins, specify `allowServiceLogon: true`. This is disabled by default since some users have experienced issues running this without service logons.\n\nThe other attribute is `sudo`. This attribute has a single property called `password`. By supplying\nthis, the service module will attempt to run commands using the user account that launched the\nprocess and the password for that account. This should only be used for accounts with administrative\nprivileges.\n\n**app.js**\n```js\nvar Service = require('node-windows').Service;\n\n// Create a new service object\nvar svc = new Service({\n  name:'Hello World',\n  script: require('path').join(__dirname,'helloworld.js')\n});\n\nsvc.sudo.password = 'password';\n...\n```\n\n### Depending on other services\n\nThe service can also be made dependant on other Windows services.\n\n```js\nvar svc = new Service({\n  name:'Hello World',\n  description: 'The nodejs.org example web server.',\n  script: 'C:\\\\path\\\\to\\\\helloworld.js',\n  dependsOn: [\"serviceA\"]\n});\n```\n\n### Cleaning Up: Uninstall a Service\n\nUninstalling a previously created service is syntactically similar to installation.\n\n```js\nvar Service = require('node-windows').Service;\n\n// Create a new service object\nvar svc = new Service({\n  name:'Hello World',\n  script: require('path').join(__dirname,'helloworld.js')\n});\n\n// Listen for the \"uninstall\" event so we know when it's done.\nsvc.on('uninstall',function(){\n  console.log('Uninstall complete.');\n  console.log('The service exists: ',svc.exists);\n});\n\n// Uninstall the service.\nsvc.uninstall();\n```\n\nThe uninstall process only removes process-specific files. **It does NOT delete your Node.js script!**\n\n### What Makes node-windows Services Unique?\n\nLots of things!\n\n**Long Running Processes \u0026 Monitoring:**\n\nThe built-in service recovery for Windows services is fairly limited and cannot easily be configured\nfrom code. Therefore, node-windows creates a wrapper around the Node.js script. This wrapper\nis responsible for restarting a failed service in an intelligent and configurable manner. For example,\nif your script crashes due to an unknown error, node-windows will attempt to restart it. By default,\nthis occurs every second. However; if the script has a fatal flaw that makes it crash repeatedly,\nit adds unnecessary overhead to the system. node-windows handles this by increasing the time interval\nbetween restarts and capping the maximum number of restarts.\n\n**Smarter Restarts That Won't Pummel Your Server:**\n\nUsing the default settings, node-windows adds 25% to the wait interval each time it needs to restart\nthe script. With the default setting (1 second), the first restart attempt occurs after one second.\nThe second occurs after 1.25 seconds. The third after 1.56 seconds (1.25 increased by 25%) and so on.\nBoth the initial wait time and the growth rate are configuration options that can be passed to a new\n`Service`. For example:\n\n```js\nvar svc = new Service({\n  name:'Hello World',\n  description: 'The nodejs.org example web server.',\n  script: 'C:\\\\path\\\\to\\\\helloworld.js',\n  wait: 2,\n  grow: .5\n});\n```\n\nIn this example, the wait period will start at 2 seconds and increase by 50%. So, the second attempt\nwould be 3 seconds later while the fourth would be 4.5 seconds later.\n\n**Don't DOS Yourself!**\n\nRepetitive recycling could potentially go on forever with a bad script. To handle these situations, node-windows\nsupports two kinds of caps. Using `maxRetries` will cap the maximum number of restart attempts. By\ndefault, this is unlimited. Setting it to 3 would tell the process to no longer restart a process\nafter it has failed 3 times. Another option is `maxRestarts`, which caps the number of restarts attempted\nwithin 60 seconds. For example, if this is set to 3 (the default) and the process crashes/restarts repeatedly,\nnode-windows will cease restart attempts after the 3rd cycle in a 60 second window. Both of these\nconfiguration options can be set, just like `wait` or `grow`.\n\nFinally, an attribute called `abortOnError` can be set to `true` if you want your script to **not** restart\nat all when it exits with an error.\n\n### How Services Are Made\n\nnode-windows uses the [winsw](https://github.com/kohsuke/winsw) utility to create a unique `.exe`\nfor each Node.js script deployed as a service. A directory called `daemon` is created and populated\nwith `myappname.exe` and `myappname.xml`. The XML file is a configuration for the executable. Additionally,\n`winsw` will create some logs for itself in this directory (which are viewable in the Event log).\n\nThe `myappname.exe` file launches the node-windows wrapper, which is responsible for monitoring and managing\nthe script. Since this file is a part of node-windows, moving the node-windows directory could result in\nthe `.exe` file not being able to find the Node.js script. However; this should not be a problem if\nnode-windows is installed globally, per the recommended installation instructions.\n\nAll of these daemon-specific files are created in a subdirectory called `daemon`, which is created in the\nsame directory where the Node.js script is saved. Uninstalling a service will remove these files.\n\n_Event Logging_\n\nServices created with node-windows have two event logs that can be viewed through the Windows Event Viewer.\nA log source named `myappname.exe` provides basic logging for the executable file. It can be used to see\nwhen the entire service starts/stops or has errors. A second log, named after your service name (i.e. My App Name),\nis used by the node-windows monitor. It is possible to write to this log from the Node.js script using\nthe node-windows Event Logging.\n\n---\n\n# Event Logging\n\nNew as of `v0.1.0` is a _non-C++_ based event logging utility. This utility can write to the event log,\nmaking your logs visible from the Event Viewer. It uses [eventcreate](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/eventcreate) under the hood.\n\nTo create a logger:\n\n```js\nvar EventLogger = require('node-windows').EventLogger;\n\nvar log = new EventLogger('Hello World');\n\nlog.info('Basic information.');\nlog.warn('Watch out!');\nlog.error('Something went wrong.');\n```\n\nLooks similar to:\n\n![Event Logging in node-windows](https://raw.github.com/coreybutler/node-windows/master/docs/eventlog.png)\n\nSome lesser-used options are also available through node-windows event logging.\n\n```js\nlog.auditSuccess('AUser Login Success');\nlog.auditFailure('AUser Login Failure');\n```\n\nEach log type (info, warn, error, auditSuccess, and auditFailure) method optionally accepts two additional\narguments, including a _code_ and _callback_. By default, the event code is `1000` if not otherwise specified.\nTo provide a custom event code with a log message and write that message to the console, the following code could\nbe used:\n\n\u003e **Notice:** It appears [eventcreate](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/eventcreate) only supports custom ID's \u003c=1000.\n\n```js\nlog.info('Something different happened!', 700, function(){\n  console.log('Something different happened!');\n});\n```\n\nBy default, event logs are all part of the `APPLICATION` scope. However; it is also possible to use the `SYSTEM` log.\nTo do this, a configuration object must be passed to the new log:\n\n```js\nvar EventLogger = require('node-windows').EventLogger;\nvar log = new EventLogger({\n  source: 'My Event Log',\n  eventLog: 'SYSTEM'\n});\n```\n\nWarning event logs that are produced by the wrapper can be suppressed by disabling it when creating the service.\nWarning logs are enabled by default.\n\n```js\nvar svc = new Service({\n  name:'Hello World',\n  description: 'The nodejs.org example web server.',\n  disableWarningLogs: true,\n});\n```\n\n---\n\n# Commands\n\nnode-windows ships with several commands to simplify tasks on MS Windows.\n\n## elevate\n\nElevate is similar to `sudo` on Linux/Mac. It attempts to elevate the privileges of the\ncurrent user to a local administrator. Using this does not require a password, but it\ndoes require that the current user have administrative privileges. Without these\nprivileges, the command will fail with a `access denied` error.\n\nOn systems with UAC enabled, this may prompt the user for permission to proceed:\n\n![UAC Prompt](http://upload.wikimedia.org/wikipedia/en/5/51/Windows_7_UAC.png)\n\n**Syntax**:\n\n`elevate(cmd[,options,callback])`\n\n- _cmd_: The command to execute with elevated privileges. This can be any string that would be typed at the command line.\n- _options_ (optional): Any options that will be passed to `require('child_process').exec(cmd,\u003cOPTIONS\u003e,callback)`.\n- _callback_ (optional): The callback function passed to `require('child_process').exec(cmd,options,\u003cCALLBACK\u003e)`.\n\n## sudo\n\nSudo acts similarly to `sudo` on Linux/Mac. Unlike _elevate_, it requires a password, but it\nwill not prompt the user for permission to proceed. Like _elevate_, this\n_still requires administrative privileges_ for the user, otherwise the command will fail.\nThe primary difference between this and _elevate()_ is the prompt.\n\n**Syntax**:\n\n`sudo(cmd,password[,options,callback])`\n\n- _cmd_: The command to execute with elevated privileges. This can be any string that would be typed at the command line.\n- _password_: The password of the user\n- _options_ (optional): Any options that will be passed to `require('child_process').exec(cmd,\u003cOPTIONS\u003e,callback)`.\n- _callback_ (optional): The callback function passed to `require('child_process').exec(cmd,options,\u003cCALLBACK\u003e)`.\n\n## isAdminUser\n\nThis asynchronous command determines whether the current user has administrative privileges.\nIt passes a boolean value to the callback, returning `true` if the user is an administrator\nor `false` if it is not.\n\n**Example**\n\n```js\nvar wincmd = require('node-windows');\n\nwincmd.isAdminUser(function(isAdmin){\n  if (isAdmin) {\n    console.log('The user has administrative privileges.');\n  } else {\n    console.log('NOT AN ADMIN');\n  }\n});\n```\n\n## list\n\nThe list method queries the operating system for a list of running processes.\n\n```js\nvar wincmd = require('node-windows');\n\nwincmd.list(function(svc){\n  console.log(svc);\n},true);\n```\n\nThis returns an array of running processes. Supplying the optional `true`\nargument in the above example provides a list with verbose output. The output is\nspecific to the version of the operating system. Here is an example of verbose\noutput on a Windows 8 computer.\n\n```js\n[{\n  ImageName: 'cmd.exe',\n  PID: '12440',\n  SessionName: 'Console',\n  'Session#': '1',\n  MemUsage: '1,736 K',\n  Status: 'Unknown',\n  UserName: 'Machine\\\\Corey',\n  CPUTime: '0:00:00',\n  WindowTitle: 'N/A'\n},{\n  ImageName: 'tasklist.exe',\n  PID: '1652',\n  SessionName: 'Console',\n  'Session#': '1',\n  MemUsage: '8,456 K',\n  Status: 'Unknown',\n  UserName: 'Machine\\\\Corey',\n  CPUTime: '0:00:00',\n  WindowTitle: 'N/A'\n}]\n```\n\nThe regular (non-verbose) output typically provides the `ImageName`,`PID`,`SessionName`,\n`Session#`, `MemUsage`, and `CPUTime`.\n\n## kill\n\nThis method will kill a process by `PID`.\n\n\n```js\nvar wincmd = require('node-windows');\n\nwincmd.kill(12345,function(){\n  console.log('Process Killed');\n});\n```\n\nIn this example, process ID `12345` would be killed. It is important to note that the\nuser account executing this node script may require administrative privileges.\n\n# Troubleshooting\n\nIf you're experiencing issues with the examples, please review the `TESTS.md` file.\n\nIf you are encountering the _invalidinstallation_ event, take a look at the `daemon`\ndirectory that is created during the installation to make sure the `.exe` and `.xml`\nfiles are there. In some circumstances, primarily during _un_installation, it is\npossbile for the process to temporarily lock a log file, which prevents Windows\nfrom removing it. In this scenario, simply run the uninstall again. In most cases this\nwill fix the issue. If not, manually remove the `daemon` directory before running the\ninstallation again.\n\n# Thank You\n\nThere have been many contributors who have done everything from committing features to helping pick up slack while I've been swamped. I'm incredibly appreciative for the help.\n\nSpecial thanks to @arthurblake whose modifications have FINALLY been added. Thanks to @hockeytim11, who helped compile and update a bunch of outstanding issues and started bringing support to the other node-* libraries.\n\n# Licenses\n\nwinsw and sudowin are the copyrights of their respective owners. winsw\nis distributed under an MIT license. sudowin is distributed under a BSD license.\n\nAll other scripts are Copyright (c) Corey Butler under an MIT license.\n\n(The MIT License)\n\nCopyright (c) 2013 Corey Butler\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":["https://github.com/sponsors/coreybutler"],"categories":["目录","Number","JavaScript","包","Packages","Process management","Repository","Libraries"],"sub_categories":["进程管理","Process management","运维\\\u0026DevOps","流程管理","Shell"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreybutler%2Fnode-windows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoreybutler%2Fnode-windows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoreybutler%2Fnode-windows/lists"}