knowledge-database (beta)

Current group: jrsoftware.innosetup

How to avoid mutiple starts of the installer program.

How to avoid mutiple starts of the installer program.  
jd
 Re: How to avoid mutiple starts of the installer program.  
Jonny Kwekkeboom
 Re: How to avoid mutiple starts of the installer program.  
Merijn Vandenabeele
 Re: How to avoid mutiple starts of the installer program.  
Jonny Kwekkeboom
 Re: How to avoid mutiple starts of the installer program.  
jd
 Re: How to avoid mutiple starts of the installer program.  
Tor Tveitane
From:jd
Subject:How to avoid mutiple starts of the installer program.
Date:Wed, 15 Dec 2004 15:38:48 +0100
Is it possible to configure the installer not to start when an instance of
the installer is already started? Sometimes the user selects the installer
twice and the result is two installers on top of each other. It may then be
difficult for the user to select which installer that should continue and
which to terminate.

JD
From:Jonny Kwekkeboom
Subject:Re: How to avoid mutiple starts of the installer program.
Date:Thu, 16 Dec 2004 06:59:58 +0100
Hi,

Like this example

function InitializeSetup(): Boolean;

begin
if CheckForMutexes('MySetupMutex')=false then begin
Createmutex('MySetupMutex');
end else begin
Result:=False;
exit;
end;
.....


cu
jonny
From:Merijn Vandenabeele
Subject:Re: How to avoid mutiple starts of the installer program.
Date:Thu, 16 Dec 2004 07:47:27 +0100
Don't forget to set Result:=True after creating the mutex.

Merijn


"Jonny Kwekkeboom" schreef in bericht
news:cpr89b$mra$1@news.jrsoftware.org...
> Hi,
>
> Like this example
>
> function InitializeSetup(): Boolean;
>
> begin
> if CheckForMutexes('MySetupMutex')=false then begin
> Createmutex('MySetupMutex');
> end else begin
> Result:=False;
> exit;
> end;
> ....
>
>
> cu
> jonny
>
From:Jonny Kwekkeboom
Subject:Re: How to avoid mutiple starts of the installer program.
Date:Thu, 16 Dec 2004 10:47:26 +0100
Hi,
> Don't forget to set Result:=True after creating the mutex.
---
Therfore ... But I see it better included ;)

cu
Jonny
From:jd
Subject:Re: How to avoid mutiple starts of the installer program.
Date:Thu, 16 Dec 2004 11:15:58 +0100
Hi
Thank you for help. The following code, inserted into the [code] section as
suggested, does the trick.

[code]
{avoid multiple starts of the installer program}
function InitializeSetup(): Boolean;
begin
if CheckForMutexes('MySetupMutex')=false then begin
Createmutex('MySetupMutex');
end else begin
Result:=False;
exit;
end;
Result:=True;
end;
--
Jd


"Merijn Vandenabeele" wrote in message
news:cprb1v$nhq$1@news.jrsoftware.org...
> Don't forget to set Result:=True after creating the mutex.
>
> Merijn
>
>
> "Jonny Kwekkeboom" schreef in bericht
> news:cpr89b$mra$1@news.jrsoftware.org...
> > Hi,
> >
> > Like this example
> >
> > function InitializeSetup(): Boolean;
> >
> > begin
> > if CheckForMutexes('MySetupMutex')=false then begin
> > Createmutex('MySetupMutex');
> > end else begin
> > Result:=False;
> > exit;
> > end;
> > ....
> >
> >
> > cu
> > jonny
> >
>
>
From:Tor Tveitane
Subject:Re: How to avoid mutiple starts of the installer program.
Date:Sun, 19 Dec 2004 09:05:22 +0100
"jd" skrev i melding news:cprn9a$rrd$1@news.jrsoftware.org...

> if CheckForMutexes('MySetupMutex')=false then begin
> Createmutex('MySetupMutex');
> end else begin
> Result:=False;
/// insert line here..
> exit;
> end;

Hi,

If I also want the routine above to restore and bring to front the other
running instance's window, which code do I insert before the 'exit;' line..?

regards

Tor
   

Copyright © 2006 knowledge-database   -   All rights reserved