getting process ID of exe running in Bat File

后端 未结 3 2025
一生所求
一生所求 2020-12-10 08:30

I require the Process id of the \"Las2xyz\" process that\'s being run in my bat file.

How can i achieve this? I can\'t use the last RUN ID or the first ID, I need th

3条回答
  •  無奈伤痛
    2020-12-10 08:49

    Use tasklist

    for /f "tokens=2" %%a in ('tasklist^|find /i "Las2xyz"') do (set pid=%%a)
    

提交回复
热议问题