Make sure that only one instance of the application is running on the system.
Questions tagged [single-instance]
250 questions
2
votes
4 answers
Limit Java Applet to only one instance
I have been using Stackoverflow for a while to find solutions to my programming questions, but for the current question I haven't found a useful solution. So I joined up.
What would be a good solution to limit a Java applet to only one instance. I'm…

AltWouss
- 136
- 1
- 9
2
votes
2 answers
How to pass arguments to a console application if it is already running?
I use a Console Application in Windows Mobile to handle incoming message interception. In the same console application i accept parameters (string args[]) which based on the parameters, register the message interceptor.
InterceptorType is a…

Ranhiru Jude Cooray
- 19,542
- 20
- 83
- 128
2
votes
0 answers
Workaround: single instance for HTA with "IE=edge"
Can anyone think of a workaround for the hta:application-tag issue? For writing an HTA with full html5 support it's necessary to set a meta-tag with "ie=edge", but then the hta:application-tag parameters don't have any effect. Is there a way to…

MvB
- 27
- 5
2
votes
1 answer
Limit the maximum process-instances by counting the amount of Mutexes?
I've written the next code that prevents multi-instancing via MUTEX, but I would like to extend its funcionality by allowing to set the maximum number of allowed instances, so I should could decide whether I want to allow only a single instance or a…

ElektroStudios
- 19,105
- 33
- 200
- 417
2
votes
1 answer
Making a singleton application across all users
I'm trying to create an application which only allows a single instance across all Windows users.
I'm currently doing it by opening a file to write and leaving it open. Is this method safe? Do you know of an alternative method using C?

Helio Santos
- 6,606
- 3
- 25
- 31
2
votes
2 answers
procedure for calling an exe only one time
I'm using process.info, process start(); to call an exe on button click in c#.net, but every time I click on the button it calls an exe and opens a duplicate file on the taskbar. I want to just maximize the exe that was already on the taskbar.
I'm…

zoya
- 473
- 4
- 11
- 21
2
votes
3 answers
Command line arguments and single instance WPF application
the WPF app I have has been redesigned to use tabs and be single instance. The new requirement is now that when launched with command line options and an instance of the app is already running - the already running instance should open a new tab and…

JerryVienna
- 122
- 4
- 13
2
votes
6 answers
Single instance batch file?
:: dostuff.bat
@echo off
:: insert long-running process call here
: End
What can I add to this batch file to make it terminate if it's already running in another process when it's executed?

lance
- 16,092
- 19
- 77
- 136
2
votes
0 answers
Application.Restart() + Single Instance conflict in windows application
Hi Friends,
I have a windows application where i controls single instance.
When this application updates using clickonce, application will restart after applying updates.
The application restarts but fails to continue as, IsFirstInstance = false…

csLijo
- 481
- 2
- 8
- 26
2
votes
1 answer
android:launchMode="singleTask" NOT prevent multiple root activities from being co-existing
My intent was to ensure the root activity in the task had only a single instance at any condition. So I set android:launchMode="singleTask", which worked fine in most cases.
However, if I switched quickly my task to others and back for many times,…

firebear
- 774
- 1
- 8
- 19
2
votes
3 answers
How to enforce single instance of an application under mono?
So, I am able to enforce single instance of my application on Windows as follows.
[STAThread]
class method Program.Main(args: array of string);
begin
var mutex := new Mutex(true, "{8F6F0AC4-B9A1-45fd-A8CF-72F04E6BDE8F}");
if…

ThN
- 3,235
- 3
- 57
- 115
2
votes
1 answer
How to reopen java application launch4j single instance
Summary: make invisible app visible again by clicking desktop icon.
I have created a java desktop application and used Launch4j to create the executable. My application needs to run as a single instance. I have achieved this my checking that option…

Justin Wiseman
- 780
- 1
- 8
- 27
2
votes
1 answer
Connecting to multiple databases via a single struts - hibernate application
We have a struts-hibernate-mysql application running on tomcat. We want to have the same codebase for the application but would like to have the application connect to different databases dynamically based on the user who logs in into the…

Kalpak
- 3,510
- 4
- 22
- 21
2
votes
2 answers
about singleton
Well i read singleton are bad because they are anti pattern. I also read that the main reason for this is the global reference to singleton, anyway:
is it always possible to avoid singleton?
If so, lets says for example i got an IOCP network and i…

ffenix
- 543
- 1
- 5
- 22
2
votes
2 answers
What is the best way to make a single instance application in Compact Framework?
I've seen all the answers for the standard framework
What is the correct way to create a single instance application?
Prevent multiple instances of a given app in .NET?
What is the best way to make a single instance application in .net?
How do I…

SwDevMan81
- 48,814
- 22
- 151
- 184