You could loop through them all looking for a match...
Or just populate an array of processes of just the ones of the desired name...VB Code:
Dim oProcess As Process For Each oProcess In System.Diagnostics.Process.GetProcesses() If oProcess.ProcessName.ToString = "YourDesiredExe" Then MessageBox.Show("YourDesiredExe is running!") End If Next
VB Code:
'Gets first item Dim oProcess As Process() = Process.GetProcessesByName("msnmsgr") MessageBox.Show(oProcess.GetUpperBound(0).ToString)





Reply With Quote