cracksman
cracksman

Reputation: 61

context menu for specific filetype

I've been trying to add a right-click context entry for .mkv files, I've added a default value of "mkv.custom" to HKEY_CLASSES_ROOT\.mkv, then added(using HKCU because it overwrites HKLM[?]) HKEY_CURRENT_USER\Software\Classes\mkv.custom\Shell\Click To Convert\command and have "ffmpeg.exe -i %1 -vcodec copy -acodec copy %1.mp4" as its default. The issue is that my menu does not appear when clicking files with the .mkv extension. Any ideas as to why this is happening?

[edit] I wrote this .reg file so you guys can test/help/(I can avoid typos)

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.mkv]
@="mkv.custom"

[HKEY_CLASSES_ROOT\mkv.custom\shell\Click to Convert\command]
@="cmd.exe" 

[HKEY_CURRENT_USER\Software\Classes\mkv.custom\Shell\Click To Convert\command]
@="cmd.exe"  

note some applications use this key HKEY_CLASSES_ROOT\.mkv\OpenWithProgIds so i also tried this, which also does not work.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.mkv\OpenWithProgIds]
"mkv.custom"=hex(0):

[HKEY_CURRENT_USER\Software\Classes\mkv.custom\Shell\Click To Convert\command]
@="cmd.exe"

[HKEY_CLASSES_ROOT\mkv.custom\Shell\Click To Convert\Command]
@="cmd.exe"

Upvotes: 0

Views: 670

Answers (1)

Sertac Akyuz
Sertac Akyuz

Reputation: 54792

From the docs:

... If you write keys to a key under HKEY_CLASSES_ROOT, the system stores the information under HKEY_LOCAL_MACHINE\Software\Classes. ..

So you end up in a verb registration that partly goes to HKLM and partly to HKCU. Use HKEY_CURRENT_USER\Software\Classes\ all along if you want to register a per user verb.

Upvotes: 2

Related Questions