Set wbemServices = GetObject("winmgmts:\\" & strComputer )
Set wbemObjectSet = wbemServices.InstancesOf("Win32_Process")
For Each process In wbemObjectSet
If InStr(1, process.Name, "notepad.exe", vbTextCompare) <> 0 Then
MsgBox "is ok"
boolFlag = True
Exit For
End If
Next