Prevent two copies of installer to run?

Got a problem you cannot solve? Try here.
Post Reply
Oleg Bayborodin
Posts: 2
Joined: Wed Jun 17, 2009 3:14 pm

Prevent two copies of installer to run?

Post by Oleg Bayborodin »

How can I prevent two (or more) instances of the same installer to run simultaneously? "Check Process" only checks for a process, and not the number of the processes running.

Thanks,
Oleg B.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

InstallAware 9 has a pre-defined compiler variable for this:
The setup engine can be forced to disallow multiple instances using the new #SINGLEINSTANCE# pre-defined compiler variable.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Oleg Bayborodin
Posts: 2
Joined: Wed Jun 17, 2009 3:14 pm

Post by Oleg Bayborodin »

Excellent! Thanks a lot for super speedy reply.

Oleg B.
JeffTucker
Posts: 62
Joined: Thu Mar 19, 2009 11:07 am
Contact:

Same issue under version 8

Post by JeffTucker »

I am aware of the mutex solution (which does work for a sample project), but for some reason at runtime there are 2 instances of our setup that always run even though the exe was only invoked once. If I put the mutex solution in place, the second one abandons its process, but that apparently is the critical instance.

Have you heard of anything like this? Could it be some sort of corruption in the msi script that causes 2 instances like this?
Fiddling with technology
JeffTucker
Posts: 62
Joined: Thu Mar 19, 2009 11:07 am
Contact:

Additional Clues - in command line

Post by JeffTucker »

I ran process explorer and found that one of the processes has no command line options - presumably the one I launched. The other has /k="" /m="some long path"
Fiddling with technology
JeffTucker
Posts: 62
Joined: Thu Mar 19, 2009 11:07 am
Contact:

SINGLEINSTANCE crashes second instance

Post by JeffTucker »

I'm evaluating version 9.0 with our installer. I defined SINGLEINSTANCE as TRUE in the Compiler variables dialog. I ran the first instance to the welcome screen. The second instance ran and crashed with a peculiar message box (9x) -> "Access violation at address 67054A25. Read of address 67054A25."
The first instance of the installer continues to run without any disturbance. Is there some way we can get rid of those message box dialogs?
Fiddling with technology
neillans
Posts: 536
Joined: Sat Nov 04, 2006 6:21 am
Location: Scottish Borders, UK

Post by neillans »

Can you send us log files and possibly the scripts you used to build your setups? Would be good to investigate this ...
Andy Neillans
tj
Posts: 44
Joined: Tue Nov 04, 2008 9:38 am
Location: Atlanta, GA

Same thing

Post by tj »

I am seeing the same thing. It's almost as if the unpacking process isn't protected by this check. Both instances go through the unpacking and then the second instance fails with the access violation.

Any progress on this? I'd be happy to send my setup scripts (it's rather large) to support if you'd like to track it down.
ALive
Posts: 109
Joined: Mon Apr 27, 2009 5:54 am
Location: Russia

Post by ALive »

Hi everyone!

Me either! I have to refuse of this functionality because the Uninstall process during Web update mechanism does not work.

In my case i cannot use (Un)Install MSI package to remove old version (as provided in the default script) because of non MSI custom actions during uninstall. So i need to execute Uninstall with the old Setup.exe with REMOVE=TRUE parameter. So we got 2 same executables run simultaneously.
Post Reply