Answer the question
In order to leave comments, you need to log in
How can one stop the execution of a cmd script by executing another script?
depending on whether the laptop's power adapter is connected or disconnected, batch files with a timer are launched, let's
say 1.cmd 2.cmd
how to make it close when 1.cmd is executed 2.cmd
tasklist sees only cmd.exe conhost.exe
Answer the question
In order to leave comments, you need to log in
in each cmd add title
taskkill /fi "windowtitle eq qwerty1"
taskkill /fi "windowtitle eq qwerty2"
something like this
I will theorize. The first thing that comes to mind is to use the primitives of the operating system, that is, to create a unique object and check it when the script starts. The second is a variation on the theme if there is this garbage, read the value and kill the script.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question