massren icon indicating copy to clipboard operation
massren copied to clipboard

Autodetect default windows text editor

Open hashhar opened this issue 8 years ago • 3 comments

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

hashhar avatar Nov 17 '15 18:11 hashhar

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

laurent22 avatar Nov 17 '15 20:11 laurent22

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

hashhar avatar Nov 17 '15 20:11 hashhar

@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 avatar Apr 18 '19 09:04 hashhar