KBanner
asked on
Process Detected on Two different Desktop Sessions
Hi,
Application is running on another remote desktop session on the same PC (using remote desktop connection) and the following code is detecting both instances on the two different desktops.
What is the easiest way to return only the number of processes on this one remote desktop ?
Application is running on another remote desktop session on the same PC (using remote desktop connection) and the following code is detecting both instances on the two different desktops.
What is the easiest way to return only the number of processes on this one remote desktop ?
ASKER
Public Shared Function bCheck4Running(ByVal sApp As String) As Boolean
Dim ps() As Process
ps = System.Diagnostics.Process.GetProcessesByName(sApp)
'if more than one Tracker Pro open
If ps.Length > 1 Then
Call KillProcess("TrackerProSplashScreen")
MsgBox(sApp & " is already running!", MsgBoxStyle.Critical, sApp & " Failure")
Return True
End If
Return False
End Function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sara, Thanks so much. Let us give it a try, and get back to you.
ASKER
Thks Sara, forgot to give you the points! My apologies
ASKER
Top notch answer
Sara