or a light version
Code:
Function EnumProc($exe)
Dim $winmgmts, $ExecQuery, $Proc, $ID, $GetObject
$winmgmts = "winmgmts:{impersonationLevel=impersonate}!//" + @wksta
$ExecQuery = "select * from Win32_Process where Name='" + "$exe'"
$GetObject = GetObject($winmgmts).ExecQuery($ExecQuery)
For Each $Proc in $GetObject
$ID = $Proc.ProcessID
$EnumProc = $ID + "|" + $EnumProc
Next
$EnumProc = Left($EnumProc,Len($EnumProc)-1)
$GetObject = ''
EndFunction

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.