massren
massren copied to clipboard
Autodetect default windows text editor
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
Good find, I wouldn't know how to implement this in Go though but, if someone is motivated, pull requests are welcome :+1:
I'll try later. Not too comfortable with messing with the registry on my machine. I'll setup a VM later.
@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.