帮忙写一个连续执行两个文件的批处理文件。

来源:百度知道 编辑:UC知道 时间:2024/06/16 11:45:21
两个可执行文件分别是a.exe和b.exe,请帮忙写一个批处理,执行完a后隔3秒钟执行b文件,谢谢。
在windows下的

::这是运行a.exe后不管a.exe是否结束都运行下一个b.exe的批处理
@echo off
start "" a.exe
ping -n 3 127.1>nul
start "" b.exe

::这是运行a.exe后当进程结束后才运行下一个b.exe的批处理
@echo off
start /wait "" a.exe
ping -n 3 127.1>nul
start "" b.exe

call start "" a.exe
:xxx
tasklist.exe|find /i "a.exe"||(ping -n 3 127.1>nul&b.exe&exit)
ping -n 2 127.1>nul
goto xxx