mutex

  • Thread starter Thread starter Aleks Kleyn
  • Start date Start date
A

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
 
Anyway, your project properties has an item in "Application", called "Make
single instance application".


Robinson.
 
I added this option. However I saw today 2 copies of application started by
differenent users.
Aleks
 
I added this option. However I saw today 2 copies of application started by
differenent users.
Aleks

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.
 
I put this property. However different user making logon to the system can
start this application.
Aleks
 
Back
Top