Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有脚本 pclose(popen("D: & cd D:\server\LoginServer & start /b startLoginServer.bat", "r")); startloginserver.bat启动java进程,我需要在需要时获取它的pid来杀死它。我对这些东西很陌生。
pclose(popen("D: & cd D:\server\LoginServer & start /b startLoginServer.bat", "r"));
startloginserver.bat
在 cmd 中执行此操作有一个命令.. 将使用pidtasklist列出进程,然后键入. 注意:pid 是列出的进程 id taskkill /PID pid /F
tasklist
taskkill /PID pid /F