Function SearchProcess(ByVal sComputerName As String, sProcessName As String) As Boolean
On Local Error Resume Next
Dim WMI_Obj As Object, WMI_ObjProps As Object, ObjClsItem As Object
Set WMI_Obj = GetObject("winmgmts:\\" & sComputerName & "\root\cimv2")
Set WMI_ObjProps = WMI_Obj.ExecQuery("SELECT * FROM Win32_Process", , 48)
If InStrRev(sProcessName, ".exe") = 0 Then sProcessName = sProcessName & ".exe"
For Each ObjClsItem In WMI_ObjProps
If ObjClsItem.Caption = sProcessName Then
SearchProcess = True
End If
Next ObjClsItem
Set ObjClsItem = Nothing
Set WMI_ObjProps = Nothing
Set WMI_Obj = Nothing
End Function