Windows Explorer: Enter executable program in menu of folder background
This example shows how to enter an executable program in the Windows file manager or desktop context menu.
To do this you have to make entries in the registry. This requires administrator privileges and a good knowledge of how to deal with the registry.
The context menu for directories is displayed by right-clicking on an empty space in a large-area folder, or by opening the menu on the desktop by right-clicking on it.
In this context menu executable programs can be added by adding two lines in the registry.
The registry can be modified manually with regedit.exe.
For the background area of folders and the desktop, the entry in the computer key: HKEY_CLASSES_ROOT is required under the directory: Directory.
In the registry, you have to scroll down to Directory under Computer \ HKEY_CLASSES_ROOT, or simply type in Directory and the cursor then jump to position.
Directory \ Background \ shell
Create a new key with the name of the key as the displayed menu text.
And additionally create a string text with the name: Icon and the value: program-with-path.exe, 0
This displays the application icon next to the menu item.
And then you have to set the program to run by creating a new subkey with the name: command
Value: Path+Program.exe %V
And as the value for Command, specify the program file with path, followed by a %V parameter to override the directory.
Note: under Folder\shell\command the startfile has to be followed by the argument %1 and under directory\Background\shell it is followed by %V
Here for an empty space in the desktop or in the large display area of a directory
Path: HKEY_CLASSE_ROOT \ Directory \ Background \ shell
Add program with: new key name = Program Title
As values in the program area:
1) Add Text variable: Name = Icon and value = Path_Programm.exe, 0
\ ProgramTitle \ command
Value = Path_Program.exe %V with %V instead of %1
After updating with F5, the function can be tested in context with a folder.
Applies to: Registry, Directory, Background, RegEdit.exe, Administrator
Expand the context menu for Windows File Explorer, File Explorer, Explorer, File Manager, Desktop Background