+ 1

How to allow one instance of exe

Hi I have an application which need to have only one instance of the application active at a time. What to do when we have to restrict one instance of exe is active?

14th Feb 2025, 5:57 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
5 Answers
+ 2
I have done this in Windows via system API calls to get the list of running windows and see if your window title is in the list. I always felt that it needed to be more reliable than using the Title property, but it was the best idea I could find. It solved the problem and there were no reports that indicated otherwise.
14th Feb 2025, 11:16 PM
Brian
Brian - avatar
+ 2
..
15th Feb 2025, 6:20 PM
š“—š“®š“» š“šš“²š“·š“° šŸ¤
š“—š“®š“» š“šš“²š“·š“° šŸ¤ - avatar
+ 1
Thanks Bob_Li and Brian Yeah, I too had an idea of title , but it is too initial thought . More than this, is there a way to achieve this as platform independently (both linux and windows ) ?
15th Feb 2025, 1:54 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
+ 1
I was also wondering about that, but it's os specific, it seems.
15th Feb 2025, 2:20 PM
Bob_Li
Bob_Li - avatar