I'd like to write a batch the öfnet me a particular program on a particular day.
Please write the code purely right here thanks
I just'd still want to write a batch that checks whether this program has been closed or not and when it was closed restarts this
The first Do I order my brother to überaschen s.Pc Birthday and the second I need because my cloud program closes occasionally there dammit remains open.
Thanks for your help
The best answer
To run a program at a certain time, you can use the Windows Task Scheduler.
A batch script that checks regelmäßg if a process is running, and this possibly restarts might look like:
@echo off: loop tasklist / FI "IMAGE NAME eq Steam.exe" 2> NUL | find / I / N "Steam.exe"> NUL if "% ERRORLEVEL%" NEQ "0" (cd "C: \ Program Files (x86) \ Steam" && start Steam.exe) timeout 20 / NOBREAK goto loop exit
In my example, every 20 seconds will determine whether Steam.exe still running.