I want to add a context-menu item like WinRAR added to files or folder's right click context menu by changing registry keys.


In the picture,

Add to "Screen Captures.rar"

WinRAR gets that name "Screen Captures" from the filename. I think WinRAR has a DLL that contains code, that gets this file name and adds dynamically to the context menu.

But in my case, I don't have a DLL so I have to do it manually. Is there any code or argument (like %1 %V etc.) that I can use on the registry keys?

My context menu item will be like:



A dynamic context menu item like the one WinRAR creates is impossible to do without additional code.

You can set the (Default) value for HKEY_CLASSES_ROOT\<ProgID>\shell\mymenu to a static string as follows:

Windows Registry Editor Version 5.00

@="My Menu Entry"

@="%SystemRoot%\\system32\\NOTEPAD.EXE %1"

This will display the following:


If you attempt to use %1 or other variables it just won't work since it'll be treated like a literal string and consequently %1 itself will show up in the menu.

  • From what I've read on the other post you wrote and external links, I think it is impossible to use managed coding in order to write shell extensions. I only know C#, @Karan if it is possible I could do some coding. ? – cagatay117 May 16 '15 at 17:21
  • You can write shell extensions in managed code, but is it not advisable. For specific C# related queries you'll need to ask on SO instead. – Karan May 16 '15 at 19:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.