[-AI-] _ProcessListProperties()程序的相關資訊

作者: GodIsland (搞不定嗎用C4就對了)   2020-01-28 22:07:48
https://www.autoitscript.com/forum/topic/70538-_processlistproperties/
主要想要取得執行中程序的執行檔路徑,沒想到不是很容易,
有高手寫了_ProcessListProperties()的UDF,有需要再調整就好
;===============================================================================
; Function Name: _ProcessListProperties()
; Description: Get various properties of a process, or all processes
; Call With: _ProcessListProperties( [$Process [, $sComputer]] )
; Parameter(s): (optional) $Process - PID or name of a process, default is
"" (all)
; (optional) $sComputer - remote computer to get list from, default
is local
; Requirement(s): AutoIt v3.2.4.9+
; Return Value(s): On Success - Returns a 2D array of processes, as in
ProcessList()
; with additional columns added:
; [0][0] - Number of processes listed (can be 0 if no matches
found)
; [1][0] - 1st process name
; [1][1] - 1st process PID
; [1][2] - 1st process Parent PID
; [1][3] - 1st process owner
; [1][4] - 1st process priority (0 = low, 31 = high)
; [1][5] - 1st process executable path
; [1][6] - 1st process CPU usage
; [1][7] - 1st process memory usage
; [1][8] - 1st process creation date/time = "MM/DD/YYY hh:mm:ss"
(hh = 00 to 23)
; [1][9] - 1st process command line string
; ...
; [n][0] thru [n][9] - last process properties
; On Failure: Returns array with [0][0] = 0 and sets @Error to non-zero
(see code below)
; Author(s): PsaltyDS at http://www.autoitscript.com/forum
; Date/Version: 12/01/2009

Links booklink

Contact Us: admin [ a t ] ucptt.com