Xbasic

PROCESS_LIST Function

Syntax

List as C = process_list([L sorted [,C delimiter [,C computer ]]])

Arguments

List

A list of processes running on a computer.

sorted

Optional. Default = .T. Indicates whether or not to sort the list alphabetically.

delimiter

Optional. Default = CR-LF. The separator to place between entries in the list.

computer

Optional. Default = "". The computer for which to show the process list.

Description

Use WMI to return a list of Windows processes.

Discussion

The PROCESS_LIST() function returns a list of processes running on a computer. If Computer is blank or ".", then the processes running on the local system are shown. If a different computer name is specified, the list of processes on that remote computer is shown, provided that the user has administrative privileges on the remote computer and a network connection is available.

Example

? process_list() 
= AcroTray.exe 
alg.exe 
alpha5.exe 
ApacheMonitor.exe 
cmd.exe 
csrss.exe 
csrss.exe 
... 

? process_list(.t., crlf() , "doc") 
= acrotray.exe 
alg.exe 
csrss.exe 
ctfmon.exe 
explorer.exe 
explorer.exe 
firefox.exe 
...

Limitations

Desktop applications only.

See Also