Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Add an Entry into the Right-click Menu in Windows

To add an entry into the right-click menu in Windows, edit the registry following the steps below.

  1. Open the registry. You can search for regedit in Windows Start menu and run it.

  2. Navigate to the key HKEY_CLASSES_ROOT\Directory\Background\shell in the registry.

  3. Create another key with any name (e.g., rstudio) under HKEY_CLASSES_ROOT\Directory\Background\shell.

  4. Set a value (e.g., Rstudio) for the newly created key (rstudio) in the right-side pane of the registry. This value (Rstudio) shows up in the right-click menu whenever you right click.

  5. Create another key named command under the newly created key (rstudio).

  6. Set the value of the newly created key command to be the full path of the application (e.g., C:\Program Files\RStudio\bin\rstudio.exe) that you want to launch.

Comments