3

Shell verbs for the .AHK extension:

  • Don't show up in Explorer context menus
  • Don't work when launching the process programmatically

I've confirmed that:

  • They're in the correct registry key
  • .ahk is set to use that registry key

.ahk registry key

AutoHotkeyScript registry key

.ahk context menu

Eric Eskildsen
  • 230
  • 4
  • 14

3 Answers3

3

The FileExts registry key was overriding the other key.

  1. Open Registry Editor.

  2. Go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.

  3. Delete the .ahk key.

    The .ahk key inside the FileExts key in Registry Editor

Now the correct shell verbs show up.

.ahk context menu with correct shell verbs

Eric Eskildsen
  • 230
  • 4
  • 14
2

To create extension-specific context menu entries that will be displayed regardless of the FileExt > PrgID association and/or the HKCU\...\Explorer\FileExts\<.ext>\UserChoice values, create your entry under:

     `HKCR\SystemFileAssociations\<.ext>`
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\SystemFileAssociations\.mp3]

[HKEY_CLASSES_ROOT\SystemFileAssociations\.mp3\Shell]

[HKEY_CLASSES_ROOT\SystemFileAssociations\.mp3\Shell\MyCommand]
@="NewMenuVerb"

[HKEY_CLASSES_ROOT\SystemFileAssociations\.mp3\Shell\MyCommand\Command]
@="Notepad \"%1\""

Keith Miller
  • 8,704
  • 1
  • 15
  • 28
0

Adding to @Eric Eskildsen's answer: If this is causing the problems, you want to add your commands to HKEY_CLASSES_ROOT\Applications\XXX.XXX\shell\....
E.g.: Your file type is associated with notepad.exe. You would add your commands to Computer\HKEY_CLASSES_ROOT\Applications\notepad.exe\shell\...