R
R
racheer2019-11-20 01:45:51
cmd/bat
racheer, 2019-11-20 01:45:51

How to track the progress of a process?

It is necessary to make it so that when the user, for example, opens CMD, echo tells him something a la you opened the command line. How to track the execution of certain processes and set your actions to the results of checks?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2019-11-20
@res2001

1. https://stackoverflow.com/questions/17404165/how-t...
2. What processes? What exactly should be tracked?
If it's just the presence of a running process, then you can use tasklist and parse its return code:

tasklist ... || echo Процесс не запущен
tasklist ... && echo Процесс запущен

A similar batch file can be added to the scheduler to run on a timer or on an event.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question