Add Custom Desktop Right-Click Commands in Regedit
You can customize the Windows desktop right-click context menu by adding shortcuts and custom commands directly through the Windows Registry Editor (Regedit). By creating specific keys under the desktop background registry path, you can launch applications, run scripts, or open tools with a single click.
The Desktop Context Menu Registry Paths
To configure commands that appear specifically on the desktop context menu, use either of the following paths in Regedit:
- Desktop Only:
HKEY_CLASSES_ROOT\DesktopBackground\Shell - Desktop and All Folder Backgrounds:
HKEY_CLASSES_ROOT\Directory\Background\shell
For changes that apply only to the currently logged-in user without
requiring administrative privileges, use: *
HKEY_CURRENT_USER\Software\Classes\DesktopBackground\Shell
Step-by-Step Configuration
1. Open the Registry Editor
Press Windows Key + R, type regedit, and
press Enter.
2. Navigate to the Shell Key
In the address bar at the top of the Registry Editor, paste the following path and press Enter:
HKEY_CLASSES_ROOT\DesktopBackground\Shell
3. Create a Key for the Menu Item
- Right-click on the
Shellfolder/key. - Select New > Key.
- Name this key what you want to appear in the right-click menu (for
example,
NotepadorCommand Prompt).
4. Create the Command Subkey
- Right-click the newly created key (e.g.,
Notepad). - Select New > Key.
- Name this subkey strictly as
command(all lowercase).
5. Set the Application Path
- Select the
commandkey. - In the right pane, double-click the (Default) string value.
- In the Value data field, enter the full path to the
executable file (for example,
C:\Windows\System32\notepad.exeor simplynotepad.exefor system applications). - Click OK.
Optional Enhancements
You can add additional string values inside your main application key
(not inside the command key) to refine the menu item:
- Add an Icon:
Right-click your main key > New > String Value. Name itIcon. Set the value data to the path of the.exeor.icofile. - Change Menu Position:
Create a String Value namedPosition. Set its value to eitherToporBottomto place the item at the top or bottom of the context menu.
The changes take effect immediately without needing to restart Windows or File Explorer. Right-click any empty space on your desktop to see your new custom command.