Hi All,
Process.GetProcessesByName() is not giving the expected results. Here is a
sample code.
Dim TestProcess() As Process
Try
TestProcess= Process.GetProcessesByName("Test.exe")
If TestProcess.Length = 0 Then
MsgBox("Not running", MsgBoxStyle.OKOnly)
Else
MsgBox("Running", MsgBoxStyle.OKOnly)
End If
Catch ex As Exception
MsgBox("Error!")
End Try
"Not Running" is displayed, though Test.exe is running.
Would anybody be able to figure out why?
Thanks.
kd