Imports System.Threading
Module Module1
Sub Main()
Dim MatchingNames As System.Diagnostics.Process()
Dim TargetName As String
TargetName = System.Diagnostics.Process.GetCurrentProcess.ProcessName
MatchingNames = System.Diagnostics.Process.GetProcessesByName(TargetName)
If (MatchingNames.Length = 1) Then
Console.WriteLine("Started...")
Else
Console.WriteLine("Process already running")
End If
End Sub
End Module