Make sure that only one instance of the application is running on the system.
Questions tagged [single-instance]
250 questions
0
votes
2 answers
How to call a WCF singleton service within a WCF singleton service without hanging?
I have two services, one that calls another. Both are marked as singletons as follows:
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single,
ConcurrencyMode = ConcurrencyMode.Multiple)]
public class Service : IService
And I set…

Michael Hedgpeth
- 7,732
- 10
- 47
- 66
0
votes
1 answer
maximizing the already running instance of a single instance app in qt
I have made an application to run only single instance using shared memory in qt.My code looks like this
int main(int argc, char *argv[])
{
QSharedMemory sharedMemory;
sharedMemory.setKey("4da7b8a28a378e7fa9004e7a95cf257f");
…

Sourabh
- 715
- 1
- 8
- 23
0
votes
0 answers
How to prevent my single instance application from getting focus
I have found several solutions for creating a single instance WinForms application. I am using C# and I currently have three working versions. But, each version is missing a feature I need.
The program has to run only once, update it's view with…
user3407753
0
votes
1 answer
Notification popup doesn't run with single instance
I want to display notification pop up when user attempts to run application second time , So I create NotificationPop obj and call the method to display the dialog within my single instance class ,but , it doesn't display popup when application…

mussdroid
- 732
- 1
- 9
- 22
0
votes
2 answers
Passing string between 2 C# application instances
I built a media player, that media player is associated with several media file types.
Every time that a user opens a media file, I check if my player is open.
I managed to prevent opening two instances but I want to pass the file path to the…

Yinon Eliraz
- 317
- 1
- 6
- 22
0
votes
2 answers
Checking if a MainWindow already exists
I have a C#/WPF application that consists of a mainwindow and a system tray icon. I have configured App.xaml with ShutdownMode="OnExplicitShutdown" in order to keep the application running in the system tray upon closing the main window.
In the…

user3342256
- 1,238
- 4
- 21
- 35
0
votes
0 answers
Application call with arguments to already running instance via WCF and wait for string result
First of all: I do really know what Google is and, yes, there are several existing threads for this topic, but I just did not find what I am searching for.
The situation might be complex and hopefully I won't forget to explain anything.
I'll come to…

Juppi89
- 1
0
votes
1 answer
Re-start shell script without creating a new process in Linux
I have a shell file which I execute then, at the end, I get the possibility to press ENTER and run it again. The problem is that each time I press ENTER a new process is created and after 20 or 30 rounds I get 30 PIDs that will finally mess up my…

ali
- 10,927
- 20
- 89
- 138
0
votes
4 answers
Restrict application to one instance per shell session on Windows
There are a lot of solutions for restricting an application from running twice. Searching by process name, using a named mutex etc. But I all of these methods don't work if I want to restrict my application to the shell session.
A user may have more…

Wienczny
- 3,958
- 4
- 30
- 35
0
votes
1 answer
How do I "single-instance" an ASP.Net AJAX web portal?
I’ve been asked if we can optionally “single-instance” our web portal. See
this post on Hanselman's blog for the same idea in a WinForms app.
Suppose we have 2 shortcuts on the same client…
jshardy
0
votes
1 answer
Single Instance at a Time and Single Operation Target
I am currently developing a visual c# application which shall run in background on the first instance "A" it was created. Now, I want that for the other time "B" the same application is run, the arguments in "B" be passed and processed in the…

jmadoremos
- 33
- 1
- 1
- 6
0
votes
2 answers
when I double-click a program of Winform or Wpf twice
If I have a program of Winform or Wpf, for example A.exe, I double-click it,a window shows, and I hide it,then double-click A.exe again, how can I make the hiden window show again?
summary for winform(1,4 and 5 are required) and Wpf(1,2 and 3 are…

Plantain Yao
- 401
- 5
- 10
0
votes
1 answer
android how to bring singleInstance activity to foreground when lockscreen is active
My application uses a BroadcastReceiver for monitoring charger connection.
When charger is connected the application started.
The main activity defined as singleInstance.
In the BroadcastReceiver i'm using…

eyal
- 2,379
- 7
- 40
- 54
0
votes
2 answers
How to create single instance of application
I am working on NFC application. when i application already opened and i read the information from NFC tag then activity open which registered Intent-Filter and this opens a new instance of application which has already opened.How can i close…

Shivam saxena
- 151
- 1
- 3
- 8
0
votes
2 answers
Python subprocess.call() spawning new process for every call
I am trying to send .mp4 files to an mp4 tagging application. My problem is that on Windows everytime I call subprocess.call() or subprocess.Popen() a new process is spawned.
What I want is to open the file in the existing process if the process is…

hammus
- 2,602
- 2
- 19
- 37