Single Instance

  • Thread starter Thread starter Pepi Tonas
  • Start date Start date
P

Pepi Tonas

Hi there,

I am looking for a way to prevent my application from starting again
if it is already running. Is there a way I can ask Windows if it is?

Thanx....
 
Get a list of processes from System.Diagnostics.Process and see if the app
is running.

-CJ
 
Every time I see this question, I think to myself... What if the application
is running under Terminal Server AND you want it to be once per Logged In
User session instead of once per machine...

What is the best way to do this?
 
Jim Hughes said:
Every time I see this question, I think to myself... What if the application
is running under Terminal Server AND you want it to be once per Logged In
User session instead of once per machine...

What is the best way to do this?

If it's easy to fetch the user's SID or domain and username, make
those part of the mutex name? What would be nice is if the same
set of techniques could be used to deal with both Terminal Server
and XP's fast user-switching, since the issues are similar. =)
 
Back
Top