[-AI-] 取得程序的命令列
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
EzHotKey 近期熱門文章
PTT數位生活區 即時熱門文章