Sub exampleIsProcessRunning()
Debug.Print IsProcessRunning("RJTV.EXE")
End Sub
Function IsProcessRunning(process As String)
Dim objList As Object
Set objList = GetObject("winmgmts:") _
.ExecQuery("select * from win32_process where name='" & process & "'")
If objList.Count > 0 Then
IsProcessRunning = True
Else
IsProcessRunning = False
End If
End Function
This code kind of works, but I'd like for it to continuously loop (without catching my computer on fire from all the iterations) and give a time stamp for when it crashes.
Bookmarks