spikey_richie Asked: 2020-04-21 06:25:04 +0800 CST2020-04-21 06:25:04 +0800 CST 2020-04-21 06:25:04 +0800 CST 如何获取启动中列出的可执行文件的路径? 772 在任务管理器的启动选项卡中,我看到一个名为“程序”的项目。我如何获得这个.exe的路径,以便我可以尝试找出它是什么? windows-10 1 个回答 Voted Best Answer Io-oI 2020-07-31T08:49:38+08:002020-07-31T08:49:38+08:00 要通过命令行获取路径,您可以尝试: wmic(Windows Management Instrumentation 命令)。 wmic startup get command|find/i ProgramName|find "." rem :: or get name.exe and command-line :: wmic startup get caption,command|findstr /b "Program Name.exe|find "." 输出为steam.exe >wmic startup get caption,command|findstr "steam.exe"|find "." Steam "C:\Program Files (x86)\Steam\steam.exe" -silent 一个for循环建议: for /f tokens^=1*delims^=^"^ %i in ('wmic startup get caption^,command^|findstr "steam.exe"')do @echo\%~i ^| %~j Steam | C:\Program Files (x86)\Steam\steam.exe" -silent for循环输出: Steam | C:\Program Files (x86)\Steam\steam.exe" -silent 为了获得路径,请使用%~dpj for /f tokens^=1*delims^=^"^ %i in ('wmic startup get caption^,command^|find/i "steam"')do @echo\%i - %~dpj for循环输出: Steam - C:\Program Files (x86)\Steam\ 基于这个问题: Getting the arguments passed to a executable using wmic
要通过命令行获取路径,您可以尝试:
wmic
(Windows Management Instrumentation 命令)。steam.exe
for
循环建议:for
循环输出:%~dpj
for
循环输出:Getting the arguments passed to a executable using wmic