Página 1 de 1

Función MDP() "Muestra Porcesos Creados Tiempo Real"

Publicado: 01 Sep 2012, 17:32
por Pink
Bueno como ando sin tiempo, les dejo esta función que trascribí a Autoit de VBscript

Muestra los Procesos Creados en tiempo real.

Código: Seleccionar todo

#cs -------------------------------------------------------
AutoIt Version: 3.3.8.1
Author..........: Pink
Script Function...: MPC() "Monitorea creación de Porcesos"
Uso..............: MPC()
#ce -------------------------------------------------------


;Ejemplo
MPC()

Func MPC()
$Computer = @ComputerName
$WMI = ObjGet("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & $Computer & "\root\cimv2")
$MonitoredProcesses = $WMI.ExecNotificationQuery("select * from __instancecreationevent " _
        & " within 1 where TargetInstance isa 'Win32_Process'")

While 1
    $LatestProcess = $MonitoredProcesses.NextEvent
    $Process=$LatestProcess.TargetInstance.Name
	msgbox(0,"",$Process) ; mostramos un Msgbox con el nombre del Proceso.
WEnd

EndFunc

Saludos