需要运行.exe,再经过杀吧〜10秒,并在批处理文件移动到下一个命令 [英] Need to run an .exe, then kill it after ~10 seconds and move to next command in batch file

查看:90
本文介绍了需要运行.exe,再经过杀吧〜10秒,并在批处理文件移动到下一个命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图创建一个运行一个.exe的批处理文件,但杀死约10秒钟后说的.exe(在完成之前),然后在文件中移动到下一个命令。任何帮助将大大AP preciated。

I am attempting to create a batch file that runs an .exe, but kills said .exe after about 10 seconds (before it completes), then moves on to the next command in the file. Any help would be greatly appreciated.

推荐答案

您可以使用此:

start program.exe
ping 127.0.0.1 -n 10
taskkill /im program.exe /f
rem continue here
echo Another command!

这篇关于需要运行.exe,再经过杀吧〜10秒,并在批处理文件移动到下一个命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆