N
N
Nikita Yaremenko2020-08-10 14:15:05
API
Nikita Yaremenko, 2020-08-10 14:15:05

How to implement a program that returns True if examle.exe is open?

The essence of the program is that if examle.exe was opened at the time of the check, n = True. Anyone have any ideas how to implement this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2020-08-10
@dimonchik2013

read running processes, look for examle.exe, set it to True

S
Stalker_RED, 2020-08-10
@Stalker_RED

tasklist /FI "IMAGENAME eq example.exe" 2>NUL | find /I /N "example.exe">NUL
IF "%ERRORLEVEL%"=="0" (
  echo process running
)
ELSE echo not running

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question