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

  • SEARCH
  • Home
  • 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 8418737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:24:37+00:00 2026-06-10T02:24:37+00:00

I need to open an application if it is not already running. Ex: I

  • 0

I need to open an application if it is not already running.

Ex: I check if the application is running, if not I should run it for it to stay running.

I’ve tried:

System.Diagnostics.Process.Start ("location of the executable");

and it will work, however, do not have the specific path of the application to open.

  • 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-06-10T02:24:38+00:00Added an answer on June 10, 2026 at 2:24 am

    Based on your comment, detecting it is pretty straightforward. Just enumerate Process.GetProcesses() or look for it explicitly by Process.GetProcessByName(). There are various examples on the MSDN GetProcesses() documentation page.

    Launching an arbitrary application, though, is not as simple. If it is in the environmental PATH variable, you can launch it without knowing the install location – Internet Explorer, for example, which you can run by just typing IExplore.exe in your Start->Run dialog on your machine.

    If you are sure that the executable is going to be in the PATH, and by you implying in your post that you can already launch it via Process.Start(), that may suffice. You can just simply then put a conditional gate in to see if it is present in the running processes before invoking Process.Start() via a call to GetProcessByName – so something like:

    var runningProcessByName = Process.GetProcessesByName("iexplore");
    if (runningProcessByName.Length == 0)
    {
        Process.Start("iexplore.exe");
    }
    

    You obviously would use the name of the application you are looking to check for / execute in place of “iexplore”. Note that you are looking for the executable name without extension when you search for processes, yet are including it when you attempt to launch it.

    Update

    Here is a good example that can be easily modified for finding an arbitrary file or list of files in C#. Please bear in mind, if you are able to target any part of the path (for example, searching inside of Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), if you can be sure it is in a Program Files variant), the search will be considerably quicker. You may also want to consider storing the search result locally once the file is found, etc.:

    Quickest way in C# to find a file in a directory with over 20,000 files

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

Sidebar

Related Questions

In my application i need to open pdf file.For that i have prepared code
I need a open source database for POS application( Swing ). I don't know
I need to let users of an application open a folder by clicking a
I need to paste a string of text to whichever application is open, and
Hey can any one tell me should i need open a port for outgoing
I'm creating Content management system in asp.net. But I need open source cascading stylesheet
I need to Open a process (easy) and then somehow paste data from my
I am making android application. On button click I just need to open specific
I have a web-page application already created, but when I open it in visual
We need to open a word document which is located on a server on

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.