diff --git a/main/register-protocol-handler.js b/main/register-protocol-handler.js index 69d36b1a..a468e964 100644 --- a/main/register-protocol-handler.js +++ b/main/register-protocol-handler.js @@ -1,6 +1,10 @@ +var electron = require('electron') + +var app = electron.app + module.exports = function () { if (process.platform === 'win32') { - registerProtocolHandler('magnet', 'URL:BitTorrent Magnet URL', 'WebTorrent.exe') + registerProtocolHandler('magnet', 'URL:BitTorrent Magnet URL', app.getPath('exe')) } }