Search notes:

Registry: HKEY_CLASSES_ROOT\*\shell

Opening any file with a specific application with a right click from Explorer

@reg add HKEY_CURRENT_USER\Software\Classes\*\shell\gvim         /f /t REG_SZ /ve /d "Edit with GVIM"
@reg add HKEY_CURRENT_USER\Software\Classes\*\shell\gvim\command /f /t REG_SZ /ve /d "\"P:\ath\to\\gvim.exe\" \"^%1\""
Github repository about-Windows-Registry, path: /HKEY_CURRENT_USER/Software/Classes/star/shell/open-with-gvim.bat
Note how the aposotrophes and the percent sign are escaped with the backslash and the caret (^).
Compare with Open cmd.exe here

See also

HKEY_CLASSES_ROOT\*

Index