Windows: Fix protocol registration

This commit is contained in:
Feross Aboukhadijeh
2016-04-04 17:52:19 -07:00
parent 30631fb879
commit 0b64dcf4ec

View File

@@ -59,13 +59,13 @@ function initWin32 () {
*/
function registerProtocolHandlerWin32 (protocol, name, icon, command) {
setProtocol()
var protocolKey = new Registry({
hive: Registry.HKCU, // HKEY_CURRENT_USER
key: '\\Software\\Classes\\' + protocol
})
setProtocol()
function setProtocol (err) {
if (err) log.error(err.message)
protocolKey.set('', Registry.REG_SZ, name, setURLProtocol)