How to check if more than one copy of app is installed

Hello,

Upon launch of my app, how can it check to see if more than one copy of that app is installed?

Thanks.

Lennox

per the Lang Ref

Add a property to your app:

mMutex As Mutex

In App.Open event handler, you can attempt to create a Mutex.

[code]
mMutex = New Mutex(“MutexExample”)

If Not mMutex.TryEnter Then
MsgBox(“You cannot have more than one copy of this app running!”)
mMutex = Nil
Quit
End If[/code]
In App.Close, you can release the Mutex:

If mMutex <> Nil Then
  mMutex.Leave
End If

Hi Dave, thanks, but that is not what I meant, I would like to know if another copy or more copies of my app is installed not running.

Sometimes, not intentionally, older versions may be located in unusual locations.

Lennox

for the most part an “installed” app that isn’t running is nothing more than a “file”.
The meaning of “installed” is ambiguous… the app may exist as a single file sitting alone in some folder/directory… it might be a program that is “registered” in some system database… it may be “installed” but have a name different that you expected…

OK, I see.
Thanks Dave.
Lennox