register protocol handlers on Windows
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)
})
Matches (as closesly as possible) the DOM Navigator.registerProtocolHandler API
registerProtocolHandler(protocol, path, name) => Promise
$ npm install register-protocol-handler-windows
From package root:
$ npm install
$ npm test
MSDN: Registering an Application to a URI Scheme
- jden jason@denizac.org
ISC. (c) MMXV jden jason@denizac.org. See LICENSE.md