jobRunner.vbs: Function ExmergeRunning

Function ExmergeRunning
  Dim strComputer, objWMIService, colProcessList

  strComputer = “.”
  Set objWMIService = GetObject(“winmgmts:{impersonationLevel=impersonate}!\\” & strComputer & WSH_Namespace)
  ExMergeRunning = TRUE
  Set colProcessList = objWMIService.ExecQuery(“Select * from Win32_Process Where Name = ‘ExMerge.exe'”)
  If colProcessList.Count = 0 then
    ExMergeRunning = FALSE
  Else
    WriteLog “Exmerge still running”
  End If
End Function