Home All Groups Group Topic Archive Search About
Author
27 Nov 2006 6:08 AM
Aleks Kleyn
I designed vb application which I expected to run all time. to make sure
that application restarts when OS (assume win2000) reboots, I put this app
to statup folder. However I put attention that 2 or 3 copies of this app may
run at the time. To make sure that only one copy of app runs at the time I
added mutex class to block start of extra copy. However it does not help.
Probably different users during logon starts one more copy and mutex cannot
catch it. how I can prevent start of second copy?

Thank you, Aleks

Author
27 Nov 2006 11:16 AM
Robinson
Anyway, your project properties has an item in "Application", called "Make
single instance application".


Robinson.


Show quoteHide quote
"Aleks Kleyn" <AleksKl***@OptOnline.net> wrote in message
news:AFD343C1-54A4-4FDB-A4A0-F5EA6C54DCDB@microsoft.com...
>I designed vb application which I expected to run all time. to make sure
>that application restarts when OS (assume win2000) reboots, I put this app
>to statup folder. However I put attention that 2 or 3 copies of this app
>may run at the time. To make sure that only one copy of app runs at the
>time I added mutex class to block start of extra copy. However it does not
>help. Probably different users during logon starts one more copy and mutex
>cannot catch it. how I can prevent start of second copy?
>
> Thank you, Aleks
Author
1 Dec 2006 4:46 AM
Aleks Kleyn
I added this option. However I saw today 2 copies of application started by
differenent users.
Aleks
Show quoteHide quote
"Robinson" <toomuchspamhaspassed@myinboxtoomuchtoooften.com> wrote in
message news:ekehdo$kc0$1$8300dec7@news.demon.co.uk...
> Anyway, your project properties has an item in "Application", called "Make
> single instance application".
>
>
> Robinson.
>
Author
1 Dec 2006 4:56 AM
Tom Shelton
On 2006-12-01, Aleks Kleyn <AleksKl***@OptOnline.net> wrote:
> I added this option. However I saw today 2 copies of application started by
> differenent users.
> Aleks
> "Robinson" <toomuchspamhaspassed@myinboxtoomuchtoooften.com> wrote in
> message news:ekehdo$kc0$1$8300dec7@news.demon.co.uk...
>> Anyway, your project properties has an item in "Application", called "Make
>> single instance application".
>>
>>
>> Robinson.
>>
>

Yep.  That can happen...  Mutex's are per user session by default.  Try
starting your mutex name with:

Global\

That should tell the mutex to be available in all sessions.

--
Tom Shelton
Author
9 Dec 2006 1:26 AM
Aleks Kleyn
I put this property. However different user making logon to the system can
start this application.
Aleks
Author
13 Dec 2006 6:08 PM
DanielReis
Why don’t you make your app a windows service?

DanyR

Show quoteHide quote
"Aleks Kleyn" wrote:

> I designed vb application which I expected to run all time. to make sure
> that application restarts when OS (assume win2000) reboots, I put this app
> to statup folder. However I put attention that 2 or 3 copies of this app may
> run at the time. To make sure that only one copy of app runs at the time I
> added mutex class to block start of extra copy. However it does not help.
> Probably different users during logon starts one more copy and mutex cannot
> catch it. how I can prevent start of second copy?
>
> Thank you, Aleks
>