Archive: How to check whether installer is runing more than once


How to check whether installer is runing more than once
Hi,

I can run the installer while it's already running. I wanna check whether the installer is running before starting the installation, if that so I can prompt a message to user and abort the current installation process.
But when I check the process list, it shows same process name for each and every installer process. Is there any plugin or method to count the number of processes for a specific program or any other way to find a solution to this problem?

Thanks..


Does this FAQ answer your question:

http://nsis.sourceforge.net/Can_I_pr..._the_installer


Oh.. Thank U so much... This made my task easy instead of the long script I've written. It handled multiple instances of the installer well.

But I faced to a problem with uninstaller as it came with the script I've written too. Problem is when I checked the list of running processes, it doesn't show the uninstaller's name as I given in the script (say "uninstall.exe"). I can find the uninstallation process name from that list and use it. But I don't know whether that method is good. I appreciate if someone can you give me a clue to find a solution or to find an explanation of changing uninstallation process name in the process list.


you should probably use the same method (creating a mutex and checking for that) for the uninstaller - the filename of the uninstaller changes randomly as the uninstaller (say A.exe) creates a temporary copy of itself (B.exe), and launches that so that it can delete the original uninstaller (A.exe).


Hi Animaether, do you mean that I should use the temporary name of the uninstaller to uninstall the appalication? i have checked the uninstaller in in two different computers and it gave the same temporary name.


Hi,
I have written the script as a message box prompts when user runs the uninstaller. This came just after the code written to check whether multiple instances are running. When I removed that part, the name I've given for the uninstaller has been taken instead of taking the randomly given name. But I don't have an exact idea about how this problem was solved by removing the message box prompting.
Thanks for the replies. They really helped me on this work.