异步运行 Windows 批处理文件命令 [英] Running Windows batch file commands asynchronously

查看:42
本文介绍了异步运行 Windows 批处理文件命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说,如果我有

  • foo.exe
  • bar.exe
  • baz.exe

如何从一个批处理文件异步运行所有这些,即不等待前一个程序停止?

How do I run all of them from a batch file asynchronously, i.e. without waiting for the previous program to stop?

推荐答案

使用START 运行每个程序的命令应该可以满足您的需求:

Using the START command to run each program should get you what you need:

START "title" [/D path] [options] "command" [parameters]

每个 START 调用都会运行其参数中给出的命令并立即返回,除非使用 /WAIT 开关执行.

Every START invocation runs the command given in its parameter and returns immediately, unless executed with a /WAIT switch.

这适用于命令行应用程序.没有命令行的应用程序无论如何都会立即返回,所以可以肯定的是,如果你想异步运行,请使用 START.

That applies to command-line apps. Apps without command line return immediately anyway, so to be sure, if you want to run all asynchronously, use START.

这篇关于异步运行 Windows 批处理文件命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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