title: Finding a running background process on computer
body: <p>I have a program I would like to monitor if someone has it open or not.  It turns out the program runs in the background like "wowexec.exe". So the processes are indented in under "explorer.exe".  I've tried two things to try and identify if this program is open or not.</p>
  
  <p>My first is</p>
  
  <pre><code> Dim p() As Process = Process.GetProcessesByName("Process")
   Dim retValue As Boolean = p.Length &gt; 0
  
   MsgBox(retValue &amp; vbCrLf &amp; "Process")
  </code></pre>
  
  <p>This works perfect for finding process on the computer, it will identify "explorer.exe" and anything else running, but cannot not identify something running in the backgorund like "wowexec.exe". </p>
  
  <p>My second attempt at this (Which may not be written correctly) is</p>
  
  <pre><code>Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  
  Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
      Dim lngFindIt As Long
      lngFindIt = FindWindow(vbNullString, "WindowName")
      If lngFindIt = 0 Then
          MsgBox("Does not Exist")
      Else
          MsgBox("Exists!")
      End If
  End Sub
  </code></pre>
  
  <p>For some reason this always returns "Exists!" regardless what I put in for the Window name. I can type a bunch of letter or leave it blank and it returns "Exists!".</p>
  
  <p>Any help is a big thanks. </p>