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:

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.

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

  1. Right-click on the Shell folder/key.
  2. Select New > Key.
  3. Name this key what you want to appear in the right-click menu (for example, Notepad or Command Prompt).

4. Create the Command Subkey

  1. Right-click the newly created key (e.g., Notepad).
  2. Select New > Key.
  3. Name this subkey strictly as command (all lowercase).

5. Set the Application Path

  1. Select the command key.
  2. In the right pane, double-click the (Default) string value.
  3. In the Value data field, enter the full path to the executable file (for example, C:\Windows\System32\notepad.exe or simply notepad.exe for system applications).
  4. 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:

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.