An open API service indexing awesome lists of open source software.

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

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