@ECHO OFF >NUL
echo next line should continue to exe
Start "" SubSurf.ahk
echo next line should wait in batch
Subway_Surfers.exe
:: next line kills SubSurf
TSKILL SubSurf /V
substitua SubSurf
pelo nome correto do processo no comando TSKILL SubSurf /V
; ; poderia ser SubSurf.ahk
, por exemplo ...
Verificado com
@ECHO OFF >NUL
@echo :: start "" calc
start "" calc
@echo :: calc running
@echo :: notepad running, "%~nx0" batch waits
notepad
@echo :: notepad end %Errorlevel%
TSKILL calc /V
Saída:
C:\bat>tolls
:: start "" calc
:: calc running
:: notepad running, "tolls.bat" batch waits
:: notepad end 0
End process (2620)
C:\bat>