Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autodetect default windows text editor #22

Open
hashhar opened this issue Nov 17, 2015 · 3 comments
Open

Autodetect default windows text editor #22

hashhar opened this issue Nov 17, 2015 · 3 comments
Assignees

Comments

@hashhar
Copy link
Collaborator

hashhar commented Nov 17, 2015

The default editor for a given file extension is stored in a registry key:
HKEY_CLASSES_ROOT/.txt/ShellNew/ItemName
It was set to this on my system as a string value
@%SystemRoot%\system32\notepad.exe,-470

See this

@laurent22
Copy link
Owner

Good find, I wouldn't know how to implement this in Go though but, if someone is motivated, pull requests are welcome 👍

@hashhar
Copy link
Collaborator Author

hashhar commented Nov 17, 2015

I'll try later. Not too comfortable with messing with the registry on my machine. I'll setup a VM later.

@hashhar
Copy link
Collaborator Author

hashhar commented Apr 18, 2019

@laurent22 It seems like we now have a package under golang.org/x. https://godoc.org/golang.org/x/sys/windows/registry

I'll take a shot at this sometime later.

@hashhar hashhar self-assigned this Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants