如何依次运行 NSIS中的.exe文件?

How to run .exe files in NSIS successively?

我正在使用 NSIS 创建一个自制软件套件的安装程序。此安装程序需要 运行 三个 .exe 文件。

Exec "Execute1.exe"
Exec "Execute2.exe"
Exec "Execute3.exe"

我运行 所有这些文件。问题是所有文件都是 运行ning 并行的。我想依次 运行 文件 - 首先是 Execute1.exe,然后是 Execute2.exe,最后是 Execute3.exe

改用ExecWait

ExecWait command [user_var(exit code)]

Execute the specified program and wait for the executed process to quit.

ExecWait "Execute1.exe"
ExecWait "Execute2.exe"
ExecWait "Execute3.exe"

ExecWait 就是您要找的。我会 link 文档,但在线 link 似乎已损坏。

File "${MSVSREDIST}${MSVSREDISTFILE2008}"
ExecWait '"${ExtractPath}${MSVSREDISTFILE2008}" /q'

File "${MSVSREDIST}${MSVSREDISTFILE2010}"
ExecWait '"${ExtractPath}${MSVSREDISTFILE2010}" /passive /norestart'

File "${DOTNET}${DOTNETFILE}"
ExecWait '"${ExtractPath}${DOTNETFILE}" /passive /norestart'