Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/04/2015, 16:23
Avatar de pkj
pkj
 
Fecha de Ingreso: julio-2006
Ubicación: Órbita sincrónica
Mensajes: 899
Antigüedad: 17 años, 9 meses
Puntos: 29
Respuesta: Como saber si un .exe de 64 bits se esta ejecuantando

Esto parece funcionar bien, y no necesita nada mas:

Código vb:
Ver original
  1. Function getProcessInfo(ByVal EXEName As String) As Boolean
  2.   Dim objProcess As Object, process As Object, strNameOfUser As String, ComputerName As String
  3.   getProcessInfo = False
  4.   ComputerName = "."
  5.   Set objProcess = GetObject("winmgmts:{impersonationLevel=impersonate}\\" _
  6.   & ComputerName & "\root\cimv2").ExecQuery("Select * From Win32_Process")
  7.   For Each process In objProcess
  8.     If UCase(process.Name) = UCase(EXEName) Then
  9.       getProcessInfo = True
  10.     End If
  11.   Next
  12.   Set objProcess = Nothing
  13. End Function

Hasta le sobra alguna variable...

Saludos
__________________
No hay preguntas tontas, solo gente estup..., ¡No!, ¿como era? No hay gente que pregunte a tontos... ¡Nooo!... ¡Vaya cabeza!