Enumerations Commands (FEX)

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > FEX. - Enumerations >

Enumerations Commands (FEX)

FEP. - For each Process

Previous Top Next


MiniRobotLanguage (MRL)

 

FEP. Enumeration Command

For each process

 

 

Intention

 

Enumerate (count ...) all running EXE's (x32 and x64).

 

Process  a script or subprogram for each Exe. You can also specify a 3.2 Standard-Search Pattern, this is applied to the filename of the loaded executable. If given only those executables are enumerated, which fit to the specified pattern.

 

You get in the Variable P2 the name of the EXE with or without  a path. Additionally #pid# is set to the PID (Process ID) of the enumerated EXE. Using the PID you will be able to get any further needed Information. For example using GDF. or GPI.

 

 

Syntax

 

 

FEP.P1|P2|P3[|P4]

 

 

Parameter Explanation

 

P1 - Label where the for each will jump "for each element"

P2 - Temp. Variable, updated by FEX each round.

P3  - Flag can be:

 

' 1,3,5 - Enum loaded EXE's

' 2,4,6 - Enum loaded DLL's (32 bit only)

' +0 give only exe/dll-name

' +2 give full path instead

' +4 give PID of parent process instead

' #pid# is always set

 

P4 - optional Standard-Pattern, is always applied to ONLY the name of the exe (without path). You can omit P4, then ALL Exe's are enumerated.

 

 

 

 

Example

 

'**********************************************

' FEP-Sample

' Shows all running processes with PID

'**********************************************

 

FEP.doit|$$FIL|1

MBX.Ready

ENR.

'---------------

:doit

'GDF.pf|

DBP.Filename is:$$FIL    PID is: #pid#

RET.

'---------------

'**********************************************

 

'**********************************************

' FEP-Sample

' Shows different Flags for enum of executables

'**********************************************

FOR.$$FLA|1|6|2

 MBX. Enumerating with Flag=$$FLA

 : $$CNT=0

 FEP.doit|$$FIL|$$FLA

NEX.

 

MBX.Ready

ENR.

 

:doit

VIC.$$CNT

DBP.$$CNT. [PID=#pid#]  $$FIL

RET.

 

 

Remarks

 

FEP. is a Member of the FEX-Family "For Each X". They are used for easy enumeration of system objects like for example windows, processes or files.

 

 

 

Limitations:

 

The enumeration of executables will work for all executables, including x64 executables. The enumeration of DLL's is experimental and only for x32.

 

 

See also:

 

    3.1 Systemvariables especially: #fex#, #fxd# . etc.

    1.6.1. Program Flow Control

    GPI. - Get Process Information

    IEP. / NEP. - If-Exists-Process

    GDF. - Get-Data-From

    WPR. - Wait-Process-Running

    WPT. - Wait-Process-Termination

    3.3 Specialfolders