How to check if a process is running via a batch script

后端 未结 18 2377
一个人的身影
一个人的身影 2020-11-22 07:38

How can I check if an application is running from a batch (well cmd) file?

I need to not launch another instance if a program is already running. (I can\'t change th

18条回答
  •  北荒
    北荒 (楼主)
    2020-11-22 08:14

    I'm assuming windows here. So, you'll need to use WMI to get that information. Check out The Scripting Guy's archives for a lot of examples on how to use WMI from a script.

提交回复
热议问题