[-AI-] 取得程序的命令列

看板EzHotKey作者 (搞不定嗎用C4就對了)時間1年前 (2023/03/23 23:26), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
How to Get the Command Line that a Running Process was Ran With? - AutoIt General Help and Support - AutoIt Forums https://www.autoitscript.com/forum/topic/164039-how-to-get-the-command-line-that-a-running-process-was-ran-with/ $PID = @AutoItPID ; just to pick a PID $oWMI = ObjGet("winmgmts:\\" & @ComputerName & "\root\CIMV2") If @error Then RunWait(@ComSpec & ' /c net start winmgmt ', '', @SW_HIDE) RunWait(@ComSpec & ' /c net continue winmgmt ', '', @SW_HIDE) $oWMI = ObjGet("winmgmts:\\" & @ComputerName & "\root\CIMV2") EndIf $oProcesses = $oWMI.ExecQuery("SELECT * FROM Win32_Process", "WQL", 0x30) For $oProcess In $oProcesses If $oProcess.ProcessId = $PID Then ExitLoop Next MsgBox(262144, Default, $oProcess.CommandLine, 0) -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.132.89.223 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/EzHotKey/M.1679585161.A.031.html
文章代碼(AID): #1a76-90n (EzHotKey)
文章代碼(AID): #1a76-90n (EzHotKey)