📜 ⬆️ ⬇️

Creating a cascading menu with shortcuts to your favorite applications in the context menu of Windows 7

image A terrible name, but did not figure out how to say it easier.
Actually, the article itself:

In the course of this article, we will discuss how to add links to selected programs to the context menu of the Windows desktop or My Computer.

The instruction is divided into 2 parts:
')
1. Create a cascading menu in the shortcut and add shortcuts.
2. Add functionality to shortcuts by registering them.

Let's start with ...

Part 1. Creating context menus and adding shortcuts

1. Open the registry editor (type “regedit” in the “Run” line or search bar in the “Start” menu and press Enter).

2. Go to the following branch:

HKEY_CLASSES_ROOT\Directory\Background\shell

If you want to add a cascade menu to the context menu of "My Computer", then you need to go to this thread:

HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell

3. Now you need to create a new registry key in the "Shell" section. Right-click on the "Shell" key and select "Create -> Partition". Give him some original and inimitable name, for example “Menu1” (without quotes).

4. Now select the “Menu1” section you just created. In the right part of the window, we need to create 4 string parameters:
  1. MUIVerb
  2. Subcommands
  3. Icon
  4. Position

You may not create the Icon and Position parameters (they are optional), but MUIVerb and SubCommands are required.

MUIVerb is the name of the cascade menu that will be displayed in the context menu. You can name it as you like, for example, "Applications", "Browsers", etc.

SubCommands contains a list of commands separated by a semicolon (;). These commands will be shown in the cascade menu. You cannot directly add an application shortcut. First you need to give the team a name in this list, and then register it according to the instructions in Part 2 of the article.

5. Let's be clear about the string parameter “SubCommands”.

Suppose that you have already created the Apps cascade menu (the translator is reluctant to make screenshots himself, so he did not translate this word), as described in paragraph 3, and now you want to add the Notepad and Notebook Calculator labels to it . In this case, you need to set this value to the “SubCommands” parameter:

notepad;calc

You can use the Notepad and Calculator commands, but in this case you will need to use them in Part 2 of this manual.

image

image

6. The Icon parameter is used to display the icon. In our example, its value is explorer.exe , so the cascading menu “Browsers” has the icon so much loved by all your favorite browser.

image

7. The parameter “Position” is used to determine the position of the cascade menu in the context menu. By default, this is the middle of the context menu, but you can choose Top (above) or Bottom (below).

8. You can create more than one menu by going through items 3 and 4 again.

Part 1. Adding functionality to shortcuts by registering them.

As soon as you add program shortcuts to your menu, you will need to register them as follows:

1. Go to the following section:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\Shell

2. In this section, we need to create new keys for each of the commands specified earlier in the string parameter SubCommands .

In our example, we used 2 commands: notepad and calc , so we need to create two keys in the “CommandStore \ Shell” section with the same names.

3. After creating the key, select it and in the right part of the registry editor, set the Default parameter with the name you want to see in the cascade menu. For example, type here Notepad or Calculator or any other string.

4. If you also want to add an icon to the shortcut, create a new string parameter named icon and set its value to the path to the EXE file of the application or any other icon. For example, to show the notepad icon, you must set the Icon parameter to notepad.exe

5. And now the last step! In each of the keys you just created, create a new key and name it command .
Select it and in the right part of the window, set the Default value to the path to the EXE file of the required program. For example, if a shortcut should open a notepad, then Command should be set to notepad.exe

image

PS: Notepad is a native Windows application, so you can omit the full path to it, but if you want to run a third-party program, you must specify the full path to its EXE file.

The author in the original text lists already prepared reg-files, so you can take them as a basis and make it all much faster.

PS Please do not kick much - this is my first full post on the habr.

UPD. In the comments asked about the finished reg-files. I add.

Desktop context menu:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Menu1]
"MUIVerb"="Apps"
"SubCommands"="notepad;calc"
"icon"="explorer.exe"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\notepad]
@="Notepad"
"icon"="notepad.exe"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\notepad\command]
@="notepad.exe"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\calc]
@="Calculator"
"icon"="calc.exe"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\calc\command]
@="calc.exe"


Context menu "My Computer":

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Menu1]
"MUIVerb"="Apps"
"SubCommands"="notepad;calc"
"icon"="explorer.exe"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\notepad]
@="Notepad"
"icon"="notepad.exe"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\notepad\command]
@="notepad.exe"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\calc]
@="Calculator"
"icon"="calc.exe"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\calc\command]
@="calc.exe"


Note : If you want to delete the created cascade menu, simply delete the keys created in paragraph 3 of the first part and paragraph 2 of the second part of the article.

UPD 2. Moved the topic to the blog "Windows 7", because, as I see, there is such a topic there :)

Source: https://habr.com/ru/post/90122/


All Articles