I am trying to debug a problem that is occuring when my .exe is running through a Terminal Server.
Problems arise when the .exe is running more than once for a User. Regardless of how that happens, here is what I am interested in doing. I would like to find out if the .exe is running more than once for a
perticular User. I have the following code working to identify if it is running. However, I cannot figure out
how to check by User also.
Can you help?
Dim x As Integer = 0
Dim Ctr As Integer = 0
Dim som() As System.Diagnostics.Process
som = System.Diagnostics.Process.GetProcesses()
Dim Name As String
For x = 0 To som.Length - 1
Name = som(x).ProcessName.ToUpper
If som(x).ProcessName = "Enhance" Then
Ctr += 1