You are here

Take certain actions based on the number of NSIS instances running

2 posts / 0 new
Last post
SimonGeek
Offline
Last seen: 1 year 1 month ago
Joined: 2022-07-24 01:22
Take certain actions based on the number of NSIS instances running

Hi, I am trying to take certain actions based on the number of NSIS instances running.
The main reason is that if there are two instances of the same executable the data created is overwritten

I asked in the NSIS forum but the code provided doesn't work. I wanted to put the code in multiple sections, the one provided by the NSIS forun can only be used once.

If there is only one instance does it perform an action, if there are two or more does it perform another

You can check if multiple instances of a process are running and take actions through "if" and "else"?

John T. Haller
John T. Haller's picture
Offline
Last seen: 9 hours 1 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
mutex, NSIS development

We use kernel32::CreateMutex to track multiple instances. You can check the Firefox Portable launcher for info.

We don't do general NSIS development here, so questions about it are best done in the NSIS forums. Note that no new apps with custom NSIS launchers will be approved. We use the PA.c Launcher to build apps which has features like the mutex already built in, no coding required.

Sometimes, the impossible can become possible, if you're awesome!

Log in or register to post comments