Module Module1
Sub Main()
Dim processByName As Process() = Process.GetProcessesByName("notepad")
If processByName Is Nothing Or processByName.Length = 0 Then
Console.WriteLine("Notepad is not running")
Else
Console.WriteLine("Notepad is running")
End If
End Sub
End Module
' run:
'
' Notepad is not running