8000 If protocol handler set to never, unregister it on Windows by damieng · Pull Request #16521 · atom/atom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

If protocol handler set to never, unregister it on Windows #16521

Merged

Conversation

damieng
Copy link
Contributor
@damieng damieng commented Jan 9, 2018

We should remove the protocol handler if never is set however the electron unregister does not appear to work so blow away the registry key instead. This is only possible on Windows.

@damieng damieng changed the title If protocol handler set top never, unregister it on Windows If protocol handler set op never, unregister it on Windows Jan 9, 2018
@damieng damieng changed the title If protocol handler set op never, unregister it on Windows If protocol handler set to never, unregister it on Windows Jan 9, 2018
if (process.platform === 'win32') {
// Only win32 supports deregistration
const Registry = require('winreg')
const commandKey = new Registry({hive: 'HKCR', key: `\\atom`})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the protocol client definitely be the only thing in this location?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, all our other registry things live under HKCU (current user). You can see them in WinShell.js

@BinaryMuse
Copy link
Contributor

@damieng Looks like winreg isn't compatible with snapshotting. It'll need to go into the ignore script.

@BinaryMuse
Copy link
Contributor

Merging with 1 failure, a known flake on appveyor.

@BinaryMuse BinaryMuse merged commit 5748f23 into master Jan 9, 2018
@BinaryMuse BinaryMuse deleted the dg-remove-protocol-handler-if-set-to-never-on-startup branch January 9, 2018 21:34
BinaryMuse pushed a commit that referenced this pull request Jan 9, 2018
…-to-never-on-startup

If protocol handler set to never, unregister it on Windows

(cherry picked from commit 5748f23)
BinaryMuse pushed a commit that referenced this pull request Jan 9, 2018
…-to-never-on-startup

If protocol handler set to never, unregister it on Windows

(cherry picked from commit 5748f23)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0