Off-topic, new to me, and mildly interesting ... Windows 10 has OPENWITH.EXE which will present a GUI app selector ... prettier than the "Open with" context menu but with the same apps. OPENWITH.EXE's notion of current directory is your profile directory, so give it a full path to the target file.
My SYSUTILS plugin has SHELLEX, which can invoke registered verbs (plus "Properties") and PROPS which is just a wrapper for "shellex /c /v properties". SHELLEX fails (no surprise) when given "Open with". So I thought I'd try to figure out the "Open with" mechanism. Using ProcessMonitor, right-clicking a txtfile caused about 6500 registry events to be recorded. Moving the mouse to "Open with" (which expands itself) gave another 3000 events. I gave up.