Use winreg 1.1.1 instead of feross fork (#408)

This commit is contained in:
Feross Aboukhadijeh
2016-04-14 14:29:44 -07:00
parent ee7e630177
commit 9c60f104c8
2 changed files with 8 additions and 8 deletions

View File

@@ -194,17 +194,17 @@ function uninstallWin32 () {
}) })
commandKey.get('', function (err, item) { commandKey.get('', function (err, item) {
if (!err && item.value.indexOf(command) >= 0) { if (!err && item.value.indexOf(command) >= 0) {
eraseProtocol() destroyProtocol()
} }
}) })
} }
function eraseProtocol () { function destroyProtocol () {
var protocolKey = new Registry({ var protocolKey = new Registry({
hive: Registry.HKCU, hive: Registry.HKCU,
key: '\\Software\\Classes\\' + protocol key: '\\Software\\Classes\\' + protocol
}) })
protocolKey.erase(function () {}) protocolKey.destroy(function () {})
} }
} }
@@ -216,7 +216,7 @@ function uninstallWin32 () {
hive: Registry.HKCU, // HKEY_CURRENT_USER hive: Registry.HKCU, // HKEY_CURRENT_USER
key: '\\Software\\Classes\\' + id key: '\\Software\\Classes\\' + id
}) })
idKey.erase(getExt) idKey.destroy(getExt)
} }
function getExt () { function getExt () {
@@ -226,17 +226,17 @@ function uninstallWin32 () {
}) })
extKey.get('', function (err, item) { extKey.get('', function (err, item) {
if (!err && item.value === id) { if (!err && item.value === id) {
eraseExt() destroyExt()
} }
}) })
} }
function eraseExt () { function destroyExt () {
var extKey = new Registry({ var extKey = new Registry({
hive: Registry.HKCU, // HKEY_CURRENT_USER hive: Registry.HKCU, // HKEY_CURRENT_USER
key: '\\Software\\Classes\\' + ext key: '\\Software\\Classes\\' + ext
}) })
extKey.erase(function () {}) extKey.destroy(function () {})
} }
} }
} }

View File

@@ -39,7 +39,7 @@
"upload-element": "^1.0.1", "upload-element": "^1.0.1",
"virtual-dom": "^2.1.1", "virtual-dom": "^2.1.1",
"webtorrent": "0.x", "webtorrent": "0.x",
"winreg": "feross/node-winreg" "winreg": "^1.1.1"
}, },
"devDependencies": { "devDependencies": {
"electron-osx-sign": "^0.3.0", "electron-osx-sign": "^0.3.0",