views:

246

answers:

2

Hi All,

I have an Updater program written in NSIS. I just wanna make sure that when it's invoked twice or more, it won't create another instance of the updater, else there would be two or more updaters running.

How do you restrict the updater from creating another instance if your updater is already running? So that only one updater is running no matter how many invocations were made.

Thanks...

+1  A: 

I just figured how to. I made use of the KillProc plugin. It returns the number of processes found. So if finds another instance, it quits the program. This makes sure only one instance is running.

Owen
+3  A: 

You should use a Mutex, see http://nsis.sourceforge.net/Allow_only_one_installer_instance

Anders
great! this is really cool... :D
Owen