How to Force an Application to Be a Single Instance in Windows

multiple instanceswindows

Is there a way I can force an application on Windows to be a single-instance application, i.e., not launch if another instance of the same application is already running? Ideally, I want to be able to do this without needing to replace the actual application with a stub, but I would not mind using one if really necessary.

Best Answer

normally you have to implement that "singleton" feature right into the application. if you want to guard it "from the outside", you have to use a wrapper which checks, if you have another instance running already. there might be more solutions to this but i once did the trick with nsis. the idea is this:

Related Question