windows 批处理脚本 - 一个接一个地运行 exe 程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18354200/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 10:48:17  来源:igfitidea点击:

Batch script - Run exe program one after another

windowsbatch-file

提问by Hansa

I have some EXE programs,Want to run using batch file one after another.

我有一些EXE程序,想一个接一个地使用批处理文件运行。

Actually one set contains 2 EXE programs with some parameters.

实际上一组包含 2 个带有一些参数的 EXE 程序。

Example.

@echo off  
start prog1.exe
start prog2.exe

/---wait untill prog1.exe and prog2.exe finish--/

start prog3.exe
start prog4.exe

回答by user151019

To run the .exes sequentually you need to pass the /wait parameter to start

要依次运行 .exes,您需要传递 /wait 参数以启动

e.g.

例如

@echo off  
start /wait prog1.exe
start /wait prog2.exe
start /wait prog3.exe
start /wait prog4.exe

However that does not run start1 and 2 in parallel. For more complex use see answers to this question

但是,这不会并行运行 start1 和 2。有关更复杂的使用,请参阅此问题的答案

回答by user1344919

you don't even need the "start /wait". it will automatically call the program and wait if you just put "progx.exe"

你甚至不需要“开始/等待”。如果您只输入“progx.exe”,它会自动调用程序并等待