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

看板EzHotKey作者 (搞不定嗎用C4就對了)時間5年前 (2020/01/28 22:07), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
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 -- v2.0.4 ; Notes: If an integer PID or string process name is provided and no match is found, ; then [0][0] = 0 and @error = 0 (not treated as an error, same as ProcessList) ; This function requires admin permissions to the target computer. ; All properties come from the Win32_Process class in WMI. ; To get time-base properties (CPU and Memory usage), a 100ms SWbemRefresher is used. ;=============================================================================== -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.132.89.223 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/EzHotKey/M.1580220472.A.D12.html
文章代碼(AID): #1UC40uqI (EzHotKey)
文章代碼(AID): #1UC40uqI (EzHotKey)