Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 518159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:54:31+00:00 2026-05-13T07:54:31+00:00

I want to check for the existence and if it doesn’t exist add some

  • 0

I want to check for the existence and if it doesn’t exist add some actions in the Explorer’s right click (context) menu.

Besides of the above requirement (for which one can find easily solutions on web) I want to add one more:

Suppose that I register the following commands:

  • “Command #1” – triggers ‘C:\MyProg.exe /cmd1’
  • “Command #2” – triggers ‘C:\MyProg.exe /cmd2’

… (aso.)

How do I check if there is already a running instance of MyProg.exe and passing it the appropriate command/command line parameter together with the filename on which the user clicked?

(IOW, I want to use the already running instance of my program to do my task and not to open a new one)

A Delphi code snippet would be appreciated.

TIA

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:54:31+00:00Added an answer on May 13, 2026 at 7:54 am

    There are two ways to add items to the context menu.

    Registry

    This method is easy since it comes down to adding some registry keys. The downside is that you can’t put any logic in it. You can read about it here and here a simple example in Delphi. You get a bit more control if you are using DDE to execute the menu items. See here for a Delphi example. If DDE doesn’t solve your ‘already running’ problem you could try and have your applications communicate with each other trough some way of IPC.

    Shell Extension

    This method is a bit more work, but you can completely control the context menu from code. You would have to write a DLL, implement IContextMenu (or others) and register the dll with Windows Explorer. You can read about it here. You could also check out Shell+.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using jQuery and I want to check the existence of an element in
I want to check for the existence of a table with a given ID
I have a user-defined table type. I want to check it's existence before editing
I want to check for duplicated words right next to each other, but even
I have an id: $id = 151; I want to check existence like this:
I want to check the file existence of the client side of GWT, by
I don't want check if an item with a value exists in the arraylist,
I want to check out all files in all subdirectories of a specified folder.
I want to check the login status of a user through an ajax request.
I want to check in Transact SQL if a specific column in a table

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.