How to Add a Program to the Windows Right-Click Menu

Open selected files with the program you choose, straight from Explorer.

Quick answer: Windows offers Open with for choosing an application, but a custom named menu command needs additional configuration. Commands+ in Productivity Plus Pack provides an editor for programs and scripts. Add the program, pass the selected file as a parameter, choose which file types show the command, then try it in File Explorer.

This example adds an Open in Notepad command for text files. It illustrates the same program, parameter and file-type settings used for other commands.

Use a sample text file for the first check. For scripts that move or change files, test on copies before using the command on your documents.

Step by step

  1. Add a command. Open Settings > Commands+ and add a custom command. Name it Open in Notepad.
  2. Choose the program. Set the program to your Windows Notepad executable, normally C:\Windows\System32\notepad.exe. Leave Run as administrator off for this example.
  3. Pass the selected file. Set the arguments to "$first_selected_path". The quotes keep a path containing spaces together as one argument.
  4. Choose where it appears. Configure the command for files matching *.txt. Save the command.
  5. Try it. Right-click a sample TXT file and choose Open in Notepad. The selected file should open in Notepad. This example passes the first selected file; use the Commands+ guide when configuring multiple-file behavior.

Ways to do it

Use what's built into Windows, the tools you already have, or Productivity Plus Pack — they work well together.

Built into Windows

Use Open with to select an app for a file, or change its default application.

With Commands+

Give a command its own name, icon, arguments and file-type filter without hand-editing registry entries.

Arrange the menu

Use Context Menu+ to position commands and group them into submenus.

Frequently Asked Questions

More about Commands+ · Full Commands+ guide · More how-to guides

Can I run a script instead?

Yes. Choose the script's interpreter and pass the script path and required arguments. Quote paths containing spaces and check the result on sample files.

Can I use a hotkey?

Yes. The first nine custom commands can be run using Ctrl+Win+Alt+G followed by a number key.

Why does my command not appear?

Check its enabled state, selected menu location and file-type filter. A command limited to TXT files will not appear for a PDF.

Put it to work

Use this idea in a real-world workflow.

Client projects

Start a client project from a template, distinguish working files from deliverables, and keep feedback and frequently used commands close to the files.

Explore all workflows →

Try it free with Productivity Plus Pack

Free 30-day trial, no account or credit card needed. Then one payment for every feature — no subscription.