https://github.com/junosuarez/register-protocol-handler-windows
register protocol handlers on Windows
https://github.com/junosuarez/register-protocol-handler-windows
Last synced: over 1 year ago
JSON representation
register protocol handlers on Windows
- Host: GitHub
- URL: https://github.com/junosuarez/register-protocol-handler-windows
- Owner: junosuarez
- License: isc
- Created: 2015-05-06T03:31:25.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-05-06T10:17:07.000Z (about 11 years ago)
- Last Synced: 2025-04-10T15:36:35.055Z (over 1 year ago)
- Language: JavaScript
- Size: 121 KB
- Stars: 11
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# register-protocol-handler-windows
register protocol handlers on Windows
## usage
```js
var registerProtocolHandler = require('register-protocol-handler-windows')
var shellCommand = '"c:\\foo.exe" "%1"' // %1 gets replaced with the URL
var register = registerProtocolHandler('foo', shellCommand, 'The Foo Protocol')
register.then(function () {
console.log('registered ok!')
})
.catch(function (e) {
console.log('registration failed:', e)
})
```
## api
Matches (as closesly as possible) the [DOM Navigator.registerProtocolHandler API](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler)
`registerProtocolHandler(protocol, path, name) => Promise`
## installation
$ npm install register-protocol-handler-windows
## running the tests
From package root:
$ npm install
$ npm test
## related documentation
[MSDN: Registering an Application to a URI Scheme](https://msdn.microsoft.com/en-us/library/aa767914.aspx)
## contributors
- jden
## license
ISC. (c) MMXV jden . See LICENSE.md