Search code examples
windowsregistrycontextmenu

Add context menu options for .hex files


I'm trying to add to Windows context menu of .hex files only a python script, but I can't find .hex extension in the "HKEY_CLASSES_ROOT". Currently, I have the script in the context menu for any kind of file but would like to limit it to only appearing when interacting with hex files.

What's the correct way of doing this?

Can this configuration be handled via a python script?


Solution

  • Follow the documentation, this stuff has not changed much since 1995.

    HKCU\Software\Classes\.hex
      ""=myhextype
    
    HKCU\Software\Classes\myhextype\shell\open\command
      ""="c:\path\myapp.exe" "%1"