Linked Questions
29 questions linked to/from Run single instance of an application using Mutex
1 vote
0 answers
2k views
Allow only a single application instance per user [duplicate]
Environment: C#, IDE: Visual Studio 2017 I am looking to know if xyz.exe application is running in computer under the current logged-in user. For Example: There are 2 users in a computer - User: A (...
2 votes
0 answers
816 views
.Net Core - How to detect if a application is running? [duplicate]
I used to detect if a application as running with this method in .net: public static bool IsApplicationAlreadyRunning() { Process[] processes = Process.GetProcessesByName(Process....
0 votes
0 answers
368 views
How to avoid running instances of the same app [duplicate]
I have a Console app on C# that is going to be deployed 4 times, with different configuration files, each instance will be fire off using a Windows Task scheduler, each will be running process and ...
-4 votes
1 answer
271 views
C an I stop my console app opening new window everytime I click the exe using a singleton pattern and without using a mutex [duplicate]
Can someone tell me How to ensure that the console app doesn't open a new window if one is already open when I run the exe file multiple times ?
412 votes
8 answers
146k views
What is a good pattern for using a Global Mutex in C#?
The Mutex class is very misunderstood, and Global mutexes even more so. What is good, safe pattern to use when creating Global mutexes? One that will work Regardless of the locale my machine is in Is ...
47 votes
11 answers
70k views
Is using a Mutex to prevent multiple instances of the same program from running safe?
I'm using this code to prevent a second instance of my program from running at the same time, is it safe? Mutex appSingleton = new System.Threading.Mutex(false, "MyAppSingleInstnceMutx"); if (...
38 votes
9 answers
117k views
Checking if my Windows application is running
How do I check if my C# Windows application is running ? I know that I can check the process name but the name can be changed if the exe changes. Is there any way to have a hash key or something to ...
9 votes
4 answers
7k views
How can I check for a running process per user session?
I have a .NET application that I only allow to run a single process at a time of, however that app is used on Citrix boxes from time to time, and as such, can be run by multiple users on the same ...
-1 votes
4 answers
5k views
Start application just one time C# [duplicate]
I just make an application in C#, but something I don't like. I want to make the application running just one time. Now, if my application is running, when I run the application again, will start ...
1 vote
1 answer
3k views
Is it possible to have same app running in multiple application domains in parallel?
Let's say I have a windows service called "MyService" and an executable called "MyEXE" Is it possible (from within "MyService") to start several instances of "MyEXE" running in seperate application ...
3 votes
2 answers
5k views
Preventing multiple process instances of a single executable
I am using .NET with C#. I want to prevent two instances of the same executable to run at the same time, but I don't want to prevent the same process that is run from another folder. For example, I ...
1 vote
2 answers
2k views
How to avoid multiple application instances?
I have an application, "myprogram.exe", which calls functions and code inside a dll, one of this functions that "myprogram.exe" calls create a new instance of a winform, "MyForm.cs" and then show it ...
1 vote
2 answers
1k views
Launch single console application
Possible duplicate: Run single instance of an application using Mutex I am using VS 2008 in C# on a console application. Not sure if there is any class available (process?) to limit only single ...
1 vote
2 answers
1k views
How to determine if an instance of the .NET application from a certain location is running?
I need to ban an application if it starts from the same folder, but allow it if the same application runs from other folders. The problem is when application closes it's becomes invisible but still is ...
0 votes
1 answer
1k views
Select And Open Multiple Files in the C# Windows Application
When I Select Multiple Files in My Computer And Open , each File Open with one Instance in My Application. In Configure Windows Application to Run One Instance,But One File Open with My Application....