Skip to main content
replaced http://superuser.com/ with https://superuser.com/
Source Link

A dynamic context menu item like the one WinRAR createscreates 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

[HKEY_CLASSES_ROOT\txtfile\shell\mymenu]
@="My Menu Entry"

[HKEY_CLASSES_ROOT\txtfile\shell\mymenu\command]
@="%SystemRoot%\\system32\\NOTEPAD.EXE %1"

This will display the following:

1

If you attempt to use %1 or other variablesother 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.

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

[HKEY_CLASSES_ROOT\txtfile\shell\mymenu]
@="My Menu Entry"

[HKEY_CLASSES_ROOT\txtfile\shell\mymenu\command]
@="%SystemRoot%\\system32\\NOTEPAD.EXE %1"

This will display the following:

1

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.

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

[HKEY_CLASSES_ROOT\txtfile\shell\mymenu]
@="My Menu Entry"

[HKEY_CLASSES_ROOT\txtfile\shell\mymenu\command]
@="%SystemRoot%\\system32\\NOTEPAD.EXE %1"

This will display the following:

1

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.

Source Link
Karan
  • 56.6k
  • 20
  • 120
  • 194

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

[HKEY_CLASSES_ROOT\txtfile\shell\mymenu]
@="My Menu Entry"

[HKEY_CLASSES_ROOT\txtfile\shell\mymenu\command]
@="%SystemRoot%\\system32\\NOTEPAD.EXE %1"

This will display the following:

1

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.